aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/message_manager.vala
diff options
context:
space:
mode:
Diffstat (limited to 'libdino/src/service/message_manager.vala')
-rw-r--r--libdino/src/service/message_manager.vala6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdino/src/service/message_manager.vala b/libdino/src/service/message_manager.vala
index c2d1021e..1f0d528b 100644
--- a/libdino/src/service/message_manager.vala
+++ b/libdino/src/service/message_manager.vala
@@ -41,13 +41,13 @@ public class MessageManager : StreamInteractionModule, Object {
message_sent(message, conversation);
}
- public Gee.List<Entities.Message>? get_messages(Conversation conversation) {
+ public Gee.List<Entities.Message>? get_messages(Conversation conversation, int count = 50) {
if (messages.has_key(conversation) && messages[conversation].size > 0) {
- Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, 50, messages[conversation][0]);
+ Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, count, messages[conversation][0]);
db_messages.add_all(messages[conversation]);
return db_messages;
} else {
- Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, 50, null);
+ Gee.List<Entities.Message> db_messages = db.get_messages(conversation.counterpart, conversation.account, count, null);
return db_messages;
}
}