aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_summary/conversation_view.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-12-06 18:08:20 +0100
committerfiaxh <git@mx.ax.lt>2017-12-13 21:11:33 +0100
commitfc0d7feb5aef16e0024cfeb73286038998e926d2 (patch)
tree22f7c9a365b6323994dccc52725e936a6ff87f6b /main/src/ui/conversation_summary/conversation_view.vala
parentbbbfdf0551fdb03e793944243dcaaf811e8ac027 (diff)
downloaddino-fc0d7feb5aef16e0024cfeb73286038998e926d2.tar.gz
dino-fc0d7feb5aef16e0024cfeb73286038998e926d2.zip
Load messages for conversation view from cache
Diffstat (limited to 'main/src/ui/conversation_summary/conversation_view.vala')
-rw-r--r--main/src/ui/conversation_summary/conversation_view.vala5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/ui/conversation_summary/conversation_view.vala b/main/src/ui/conversation_summary/conversation_view.vala
index 37412335..7924da57 100644
--- a/main/src/ui/conversation_summary/conversation_view.vala
+++ b/main/src/ui/conversation_summary/conversation_view.vala
@@ -74,7 +74,8 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
populator.init(conversation, this, Plugins.WidgetType.GTK);
}
message_item_populator.init(conversation, this);
- message_item_populator.populate_number(conversation, new DateTime.now_utc(), 50);
+ message_item_populator.populate_latest(conversation, 40);
+ Idle.add(() => { on_value_notify(); return false; });
stack.set_visible_child_name("main");
}
@@ -217,7 +218,7 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
private void load_earlier_messages() {
was_value = scrolled.vadjustment.value;
if (!reloading_mutex.trylock()) return;
- if (meta_items.size > 0) message_item_populator.populate_number(conversation, meta_items.first().sort_time, 20);
+ if (meta_items.size > 0) message_item_populator.populate_before(conversation, meta_items.first(), 20);
}
private static int sort_meta_items(Plugins.MetaConversationItem a, Plugins.MetaConversationItem b) {