diff options
author | fiaxh <git@lightrise.org> | 2020-12-04 19:11:27 +0100 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2020-12-04 19:11:27 +0100 |
commit | cc01374d3cb6a8bf477e8f96378f20b9aff57536 (patch) | |
tree | 16275a127a84d9dc5aa1269aef7590d8fd8ea73d /main/src/ui/global_search.vala | |
parent | f31e96d6bb51448a87edd820ebca630ca576d890 (diff) | |
download | dino-cc01374d3cb6a8bf477e8f96378f20b9aff57536.tar.gz dino-cc01374d3cb6a8bf477e8f96378f20b9aff57536.zip |
Use advertized/server/live time for sorting instead of arrival time
fixes #310
Diffstat (limited to 'main/src/ui/global_search.vala')
-rw-r--r-- | main/src/ui/global_search.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala index 2de47f64..27ffb9d9 100644 --- a/main/src/ui/global_search.vala +++ b/main/src/ui/global_search.vala @@ -146,8 +146,8 @@ public class GlobalSearch : Overlay { private void append_messages(Gee.List<MessageItem> messages) { foreach (MessageItem item in messages) { - Gee.List<MessageItem> before_message = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages_before_message(item.conversation, item.message.local_time, item.message.id, 1); - Gee.List<MessageItem> after_message = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages_after_message(item.conversation, item.message.local_time, item.message.id, 1); + Gee.List<MessageItem> before_message = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages_before_message(item.conversation, item.message.time, item.message.id, 1); + Gee.List<MessageItem> after_message = stream_interactor.get_module(MessageStorage.IDENTITY).get_messages_after_message(item.conversation, item.message.time, item.message.id, 1); Box context_box = new Box(Orientation.VERTICAL, 5) { visible=true }; if (before_message != null && before_message.size > 0) { @@ -161,7 +161,7 @@ public class GlobalSearch : Overlay { context_box.add(get_context_message_widget(after_message.first())); } - Label date_label = new Label(ConversationSummary.ItemMetaDataHeader.get_relative_time(item.display_time.to_local())) { xalign=0, visible=true }; + Label date_label = new Label(ConversationSummary.ItemMetaDataHeader.get_relative_time(item.time.to_local())) { xalign=0, visible=true }; date_label.get_style_context().add_class("dim-label"); string display_name = Util.get_conversation_display_name(stream_interactor, item.conversation); |