diff options
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/MessageParser.java | 12 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/MessageParser.java b/src/main/java/de/pixart/messenger/parser/MessageParser.java index e86758fd7..7cfd69e8b 100644 --- a/src/main/java/de/pixart/messenger/parser/MessageParser.java +++ b/src/main/java/de/pixart/messenger/parser/MessageParser.java @@ -844,7 +844,17 @@ public class MessageParser extends AbstractParser implements OnMessagePacketRece if (message.addReadByMarker(readByMarker)) { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": added read by (" + readByMarker.getRealJid() + ") to message '" + message.getBody() + "'"); mXmppConnectionService.updateMessage(message, false); - mXmppConnectionService.markMessage(account, from.asBareJid(), id, Message.STATUS_SEND_DISPLAYED); + final Message displayedMessage = mXmppConnectionService.markMessage(account, from.asBareJid(), id, Message.STATUS_SEND_DISPLAYED); + Message m = displayedMessage == null ? null : displayedMessage.prev(); + while (m != null + && m.getStatus() == Message.STATUS_SEND_RECEIVED + && m.getTimeSent() < displayedMessage.getTimeSent()) { + mXmppConnectionService.markMessage(m, Message.STATUS_SEND_DISPLAYED); + m = m.prev(); + } + if (displayedMessage != null && selfAddressed) { + dismissNotification(account, counterpart, query); + } } } } diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 58f9441fa..f1ebb0d63 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -2540,7 +2540,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke if (!ReadByMarker.contains(marker, addedMarkers)) { addedMarkers.add(marker); //may be put outside this condition. set should do dedup anyway MucOptions.User user = mucOptions.findUser(marker); - shownMarkers.add(user); + if (user != null && !users.contains(user)) { + shownMarkers.add(user); + } } } final ReadByMarker markerForSender = ReadByMarker.from(messageList.get(i)); |