diff options
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/ui/conversation_selector/conversation_selector_row.vala | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/main/src/ui/conversation_selector/conversation_selector_row.vala b/main/src/ui/conversation_selector/conversation_selector_row.vala index 8d601309..3696f6da 100644 --- a/main/src/ui/conversation_selector/conversation_selector_row.vala +++ b/main/src/ui/conversation_selector/conversation_selector_row.vala @@ -166,13 +166,10 @@ public class ConversationSelectorRow : ListBoxRow { } protected void update_read() { - MessageItem? message_item = last_content_item as MessageItem; - if (message_item == null) return; - Message last_message = message_item.message; + bool current_read_status = !stream_interactor.get_module(ChatInteraction.IDENTITY).has_unread(conversation); + if (read == current_read_status) return; + read = current_read_status; - bool read_was = read; - read = last_message == null || (conversation.read_up_to != null && last_message.equals(conversation.read_up_to)); - if (read == read_was) return; if (read) { name_label.attributes.filter((attr) => attr.equal(attr_weight_new(Weight.BOLD))); time_label.attributes.filter((attr) => attr.equal(attr_weight_new(Weight.BOLD))); |