From dff8e08669996936cb58884c71b5ecd6ad7b1f76 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Fri, 18 Aug 2017 00:46:40 +0200 Subject: MAM fixes - don't send first request for timestamp -60 - only open conversation for messages within last 24h - always show latest message in conversation tabs --- main/src/ui/conversation_selector/conversation_row.vala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'main') diff --git a/main/src/ui/conversation_selector/conversation_row.vala b/main/src/ui/conversation_selector/conversation_row.vala index bb31b90d..2aa913b5 100644 --- a/main/src/ui/conversation_selector/conversation_row.vala +++ b/main/src/ui/conversation_selector/conversation_row.vala @@ -45,19 +45,19 @@ public abstract class ConversationRow : ListBoxRow { x_button.clicked.connect(on_x_button_clicked); update_name(Util.get_conversation_display_name(stream_interactor, conversation)); - Entities.Message message = stream_interactor.get_module(MessageStorage.IDENTITY).get_last_message(conversation); - if (message != null) { - message_received(message); - } + message_received(); } public void update() { update_time(); } - public void message_received(Entities.Message message) { - update_message(message.body.replace("\n", " ")); - update_time(message.time.to_local()); + public void message_received(Entities.Message? m = null) { + Entities.Message? message = stream_interactor.get_module(MessageStorage.IDENTITY).get_last_message(conversation); + if (message != null) { + update_message(message.body.replace("\n", " ")); + update_time(message.time.to_local()); + } } public void set_avatar(Pixbuf pixbuf, int scale_factor = 1) { -- cgit v1.2.3-70-g09d2