aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity/account.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-03-24 22:57:05 +0100
committerfiaxh <git@mx.ax.lt>2017-03-31 01:21:35 +0200
commit7d2f995a097086be01426cc79c9c801dabaf9e3b (patch)
tree32b00adeaec82843a9f41fb3de17adc25e62fcc1 /libdino/src/entity/account.vala
parent3733d24a9066bdd3e038d642a62cf642abd0b0bf (diff)
downloaddino-7d2f995a097086be01426cc79c9c801dabaf9e3b.tar.gz
dino-7d2f995a097086be01426cc79c9c801dabaf9e3b.zip
Fix conversation last_active
Diffstat (limited to 'libdino/src/entity/account.vala')
-rw-r--r--libdino/src/entity/account.vala21
1 files changed, 14 insertions, 7 deletions
diff --git a/libdino/src/entity/account.vala b/libdino/src/entity/account.vala
index 3f1bfdb2..59a76c7d 100644
--- a/libdino/src/entity/account.vala
+++ b/libdino/src/entity/account.vala
@@ -71,13 +71,20 @@ public class Account : Object {
}
private void on_update(Object o, ParamSpec sp) {
- db.account.update().with(db.account.id, "=", id)
- .set(db.account.bare_jid, bare_jid.to_string())
- .set(db.account.resourcepart, resourcepart)
- .set(db.account.password, password)
- .set(db.account.alias, alias)
- .set(db.account.enabled, enabled)
- .perform();
+ var update = db.account.update().with(db.account.id, "=", id);
+ switch (sp.name) {
+ case "bare-jid":
+ update.set(db.account.bare_jid, bare_jid.to_string()); break;
+ case "resourcepart":
+ update.set(db.account.resourcepart, resourcepart); break;
+ case "password":
+ update.set(db.account.password, password); break;
+ case "alias":
+ update.set(db.account.alias, alias); break;
+ case "enabled":
+ update.set(db.account.enabled, enabled); break;
+ }
+ update.perform();
}
}