aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/services
diff options
context:
space:
mode:
authorDaniel Gultsch <inputmice@siacs.eu>2015-03-01 14:15:40 +0100
committerDaniel Gultsch <inputmice@siacs.eu>2015-03-01 14:15:40 +0100
commitff86fa604903cd77fe26860be0cc256b5d1e04eb (patch)
tree43d85cfc20fa2e56f71a9a6ad99a4696127dae78 /src/main/java/eu/siacs/conversations/services
parentd318af098d28b6685219f852558087eee5c8c3ae (diff)
mark all sent messages up to a marker as displayed
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 90f69338..a67378de 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -2013,19 +2013,20 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
}
- public boolean markMessage(final Account account, final Jid recipient, final String uuid,
- final int status) {
+ public Message markMessage(final Account account, final Jid recipient, final String uuid, final int status) {
if (uuid == null) {
- return false;
- } else {
- for (Conversation conversation : getConversations()) {
- if (conversation.getJid().equals(recipient)
- && conversation.getAccount().equals(account)) {
- return markMessage(conversation, uuid, status);
+ return null;
+ }
+ for (Conversation conversation : getConversations()) {
+ if (conversation.getJid().equals(recipient) && conversation.getAccount() == account) {
+ final Message message = conversation.findSentMessageWithUuid(uuid);
+ if (message != null) {
+ markMessage(message, status);
}
+ return message;
}
- return false;
}
+ return null;
}
public boolean markMessage(Conversation conversation, String uuid,