From 5d11fe7dc6ad49388d2911b87e23c752e84c0ae3 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Mon, 15 Jan 2018 11:13:35 +0100 Subject: [PATCH] added a few todos to source code --- src/main/java/eu/siacs/conversations/parser/MessageParser.java | 2 +- .../eu/siacs/conversations/services/NotificationService.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 4979af5de..33005b1ed 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -741,7 +741,7 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece if (packet.fromAccount(account)) { Conversation conversation = mXmppConnectionService.find(account, counterpart.toBareJid()); if (conversation != null && (query == null || query.isCatchup())) { - mXmppConnectionService.markRead(conversation); + mXmppConnectionService.markRead(conversation); //TODO only mark messages read that are older than timestamp } } else if (isTypeGroupChat) { Conversation conversation = mXmppConnectionService.find(account, counterpart.toBareJid()); diff --git a/src/main/java/eu/siacs/conversations/services/NotificationService.java b/src/main/java/eu/siacs/conversations/services/NotificationService.java index 408d7f71c..00738fa1c 100644 --- a/src/main/java/eu/siacs/conversations/services/NotificationService.java +++ b/src/main/java/eu/siacs/conversations/services/NotificationService.java @@ -225,8 +225,10 @@ public class NotificationService { } synchronized (notifications) { markAsReadIfHasDirectReply(conversation); + //TODO: only update if something actually got removed? notifications.remove(conversation.getUuid()); final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(mXmppConnectionService); + //TODO on later androids (that have multiple Conversations) maybe canceling is enough + update summary notification notificationManager.cancel(conversation.getUuid(), NOTIFICATION_ID); updateNotification(false); }