diff options
author | fiaxh <git@mx.ax.lt> | 2017-08-27 23:55:49 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-08-28 00:02:59 +0200 |
commit | 8bc0d107e740be468ee0c9dcd253de36355088d3 (patch) | |
tree | 36858e844d711eb18a68612fd815cb84f4c3a88f /libdino/src/service | |
parent | a807ded65cd907e04bab7b8cd27b5702b157e3a2 (diff) | |
download | dino-8bc0d107e740be468ee0c9dcd253de36355088d3.tar.gz dino-8bc0d107e740be468ee0c9dcd253de36355088d3.zip |
Plugins providing conversation items for ConversationView
Diffstat (limited to 'libdino/src/service')
-rw-r--r-- | libdino/src/service/database.vala | 4 | ||||
-rw-r--r-- | libdino/src/service/message_storage.vala | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libdino/src/service/database.vala b/libdino/src/service/database.vala index 91a62cce..51d16e59 100644 --- a/libdino/src/service/database.vala +++ b/libdino/src/service/database.vala @@ -201,7 +201,7 @@ public class Database : Qlite.Database { } } - public Gee.List<Message> get_messages(Jid jid, Account account, Message.Type? type, int count, Message? before) { + public Gee.List<Message> get_messages(Jid jid, Account account, Message.Type? type, int count, DateTime? before) { QueryBuilder select = message.select() .with(message.counterpart_id, "=", get_jid_id(jid)) .with(message.account_id, "=", account.id) @@ -214,7 +214,7 @@ public class Database : Qlite.Database { select.with(message.type_, "=", (int) type); } if (before != null) { - select.with(message.time, "<", (long) before.time.to_unix()); + select.with(message.time, "<", (long) before.to_unix()); } LinkedList<Message> ret = new LinkedList<Message>(); diff --git a/libdino/src/service/message_storage.vala b/libdino/src/service/message_storage.vala index 1cde1a95..76a8e60d 100644 --- a/libdino/src/service/message_storage.vala +++ b/libdino/src/service/message_storage.vala @@ -47,7 +47,7 @@ public class MessageStorage : StreamInteractionModule, Object { return null; } - public Gee.List<Message>? get_messages_before(Conversation? conversation, Message before, int count = 20) { + public Gee.List<Message>? get_messages_before(Conversation? conversation, DateTime before, int count = 20) { Gee.List<Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, Util.get_message_type_for_conversation(conversation), count, before); return db_messages; } |