aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/service/notification_events.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2020-04-29 21:31:23 +0200
committerfiaxh <git@lightrise.org>2020-06-03 21:50:40 +0200
commit71be2abb6a007fd9b4ed3164d70f5cb95d49ce69 (patch)
treef4dcdb63e08ce6dc0e4933e30e18cec27c604719 /libdino/src/service/notification_events.vala
parentb5066e0e2f4b482204f43402c797d8bf9f7ef582 (diff)
downloaddino-71be2abb6a007fd9b4ed3164d70f5cb95d49ce69.tar.gz
dino-71be2abb6a007fd9b4ed3164d70f5cb95d49ce69.zip
Store last read content item for conversations
fixes #495
Diffstat (limited to 'libdino/src/service/notification_events.vala')
-rw-r--r--libdino/src/service/notification_events.vala8
1 files changed, 1 insertions, 7 deletions
diff --git a/libdino/src/service/notification_events.vala b/libdino/src/service/notification_events.vala
index 3f4e3c6d..5e81ff89 100644
--- a/libdino/src/service/notification_events.vala
+++ b/libdino/src/service/notification_events.vala
@@ -33,15 +33,9 @@ public class NotificationEvents : StreamInteractionModule, Object {
}
private void on_content_item_received(ContentItem item, Conversation conversation) {
-
ContentItem last_item = stream_interactor.get_module(ContentItemStore.IDENTITY).get_latest(conversation);
- bool not_read_up_to = true;
- MessageItem message_item = item as MessageItem;
- if (message_item != null) {
- not_read_up_to = conversation.read_up_to != null && !conversation.read_up_to.equals(message_item.message);
- }
- if (item.id != last_item.id && not_read_up_to) return;
+ if (item.id != last_item.id && last_item.id != conversation.read_up_to_item) return;
if (!should_notify(item, conversation)) return;
if (stream_interactor.get_module(ChatInteraction.IDENTITY).is_active_focus()) return;