diff options
author | fiaxh <git@mx.ax.lt> | 2017-08-18 00:46:40 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-08-19 00:31:44 +0200 |
commit | dff8e08669996936cb58884c71b5ecd6ad7b1f76 (patch) | |
tree | 1bed7be48a042ca788f466a149ab0f434a53c34f /main | |
parent | 299f52df3af8bc7dafcd9a5a6e12d31042734357 (diff) | |
download | dino-dff8e08669996936cb58884c71b5ecd6ad7b1f76.tar.gz dino-dff8e08669996936cb58884c71b5ecd6ad7b1f76.zip |
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
Diffstat (limited to 'main')
-rw-r--r-- | main/src/ui/conversation_selector/conversation_row.vala | 14 |
1 files changed, 7 insertions, 7 deletions
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) { |