aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-16 11:44:42 +0200
committerfiaxh <git@mx.ax.lt>2017-08-17 01:26:03 +0200
commitfb36ea055301b6db513a31acde30f315e2c0fd68 (patch)
treee9bfeecc12a3824e3b9a86abbed44856ef6dd1e0 /libdino/src/entity
parent30818b3965aef36f161147881967006d6e9376a6 (diff)
downloaddino-fb36ea055301b6db513a31acde30f315e2c0fd68.tar.gz
dino-fb36ea055301b6db513a31acde30f315e2c0fd68.zip
Message Archive Management
Diffstat (limited to 'libdino/src/entity')
-rw-r--r--libdino/src/entity/account.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/libdino/src/entity/account.vala b/libdino/src/entity/account.vala
index 23544b46..f0628ca4 100644
--- a/libdino/src/entity/account.vala
+++ b/libdino/src/entity/account.vala
@@ -16,6 +16,7 @@ public class Account : Object {
public string? alias { get; set; }
public bool enabled { get; set; default = false; }
public string? roster_version { get; set; }
+ public DateTime mam_earliest_synced { get; set; default=new DateTime.from_unix_utc(0); }
private Database? db;
@@ -36,6 +37,7 @@ public class Account : Object {
alias = row[db.account.alias];
enabled = row[db.account.enabled];
roster_version = row[db.account.roster_version];
+ mam_earliest_synced = new DateTime.from_unix_utc(row[db.account.mam_earliest_synced]);
notify.connect(on_update);
}
@@ -49,6 +51,7 @@ public class Account : Object {
.value(db.account.alias, alias)
.value(db.account.enabled, enabled)
.value(db.account.roster_version, roster_version)
+ .value(db.account.mam_earliest_synced, (long)mam_earliest_synced.to_unix())
.perform();
notify.connect(on_update);
@@ -88,9 +91,11 @@ public class Account : Object {
update.set(db.account.enabled, enabled); break;
case "roster-version":
update.set(db.account.roster_version, roster_version); break;
+ case "mam-earliest-synced":
+ update.set(db.account.mam_earliest_synced, (long)mam_earliest_synced.to_unix()); break;
}
update.perform();
}
}
-} \ No newline at end of file
+}