From 760fd4cb26340165fb85c2e3aee8390e46dc8b63 Mon Sep 17 00:00:00 2001 From: bobufa Date: Sat, 23 Jun 2018 11:59:21 +0200 Subject: load+display later messages when scrolling down --- main/src/ui/conversation_summary/content_populator.vala | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'main/src/ui/conversation_summary/content_populator.vala') diff --git a/main/src/ui/conversation_summary/content_populator.vala b/main/src/ui/conversation_summary/content_populator.vala index 9fb83419..cec54c7b 100644 --- a/main/src/ui/conversation_summary/content_populator.vala +++ b/main/src/ui/conversation_summary/content_populator.vala @@ -53,6 +53,18 @@ public class ContentProvider : ContentItemCollection, Object { } return ret; } + + public Gee.List populate_after(Conversation conversation, Plugins.MetaConversationItem before_item, int n) { + Gee.List ret = new ArrayList(); + ContentMetaItem? content_meta_item = before_item as ContentMetaItem; + if (content_meta_item != null) { + Gee.List items = stream_interactor.get_module(ContentItemAccumulator.IDENTITY).populate_after(this, conversation, content_meta_item.content_item, n); + foreach (ContentItem item in items) { + ret.add(new ContentMetaItem(item, widget_factory)); + } + } + return ret; + } } public class ContentMetaItem : Plugins.MetaConversationItem { -- cgit v1.2.3-54-g00ecf