diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-22 17:15:06 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-23 14:36:53 +0100 |
commit | fa78573b052693b29350bdd0f7eaf74dc6571e4a (patch) | |
tree | 7efcb3eb96e5c3d17c6a1c0604eff533e1244a20 /libdino/src/service/conversation_manager.vala | |
parent | ec06d5f9ebd7142f4be422e73b46d6702671927d (diff) | |
download | dino-fa78573b052693b29350bdd0f7eaf74dc6571e4a.tar.gz dino-fa78573b052693b29350bdd0f7eaf74dc6571e4a.zip |
Move some database interaction into entities
fixes #2
Diffstat (limited to 'libdino/src/service/conversation_manager.vala')
-rw-r--r-- | libdino/src/service/conversation_manager.vala | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libdino/src/service/conversation_manager.vala b/libdino/src/service/conversation_manager.vala index 10c6ac51..2d046e83 100644 --- a/libdino/src/service/conversation_manager.vala +++ b/libdino/src/service/conversation_manager.vala @@ -92,10 +92,9 @@ public class ConversationManager : StreamInteractionModule, Object { private void ensure_add_conversation(Jid jid, Account account, Conversation.Type type) { if (conversations.has_key(account) && !conversations[account].has_key(jid)) { - Conversation conversation = new Conversation(jid, account); - conversation.type_ = type; + Conversation conversation = new Conversation(jid, account, type); add_conversation(conversation); - db.add_conversation(conversation); + conversation.persist(db); } } |