aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/entity
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-04-23 10:23:11 +0200
committerMarvin W <git@larma.de>2017-04-26 21:48:53 +0200
commit9728e832b18e8bbfcc0e011b5b1da9afe6021bf3 (patch)
tree301d6d127b7a94bd7f0f1ab7f496d5d26c007a3f /libdino/src/entity
parenteddf17c68274c3e8ecf86a13858243159ffe9714 (diff)
downloaddino-9728e832b18e8bbfcc0e011b5b1da9afe6021bf3.tar.gz
dino-9728e832b18e8bbfcc0e011b5b1da9afe6021bf3.zip
qlite/libdino: optimize db access
Diffstat (limited to 'libdino/src/entity')
-rw-r--r--libdino/src/entity/conversation.vala8
1 files changed, 1 insertions, 7 deletions
diff --git a/libdino/src/entity/conversation.vala b/libdino/src/entity/conversation.vala
index 7e8b1424..e820af4d 100644
--- a/libdino/src/entity/conversation.vala
+++ b/libdino/src/entity/conversation.vala
@@ -88,13 +88,7 @@ public class Conversation : Object {
}
private void on_update(Object o, ParamSpec sp) {
- var update = db.conversation.update().with(db.conversation.jid_id, "=", db.get_jid_id(counterpart))
- .with(db.conversation.account_id, "=", account.id);
- if (counterpart.resourcepart != null) {
- update.with(db.conversation.resource, "=", counterpart.resourcepart);
- } else {
- update.with_null(db.conversation.resource);
- }
+ var update = db.conversation.update().with(db.conversation.id, "=", id);
switch (sp.name) {
case "type-":
update.set(db.conversation.type_, type_); break;