aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_selector
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-18 00:46:40 +0200
committerfiaxh <git@mx.ax.lt>2017-08-19 00:31:44 +0200
commitdff8e08669996936cb58884c71b5ecd6ad7b1f76 (patch)
tree1bed7be48a042ca788f466a149ab0f434a53c34f /main/src/ui/conversation_selector
parent299f52df3af8bc7dafcd9a5a6e12d31042734357 (diff)
downloaddino-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/src/ui/conversation_selector')
-rw-r--r--main/src/ui/conversation_selector/conversation_row.vala14
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) {