diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-08-03 22:24:16 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-08-03 22:24:16 +0200 |
commit | 316b0203f8b68242ccd19bbf4f31e776fad5875a (patch) | |
tree | 0d6571ac13ab667b599b5a2174482f966a7d7e72 /src/main/java/de/pixart/messenger/services | |
parent | c0ed19f913d8969d5cde9afed892ff4b516ddbc8 (diff) |
call onMessageFound outside sync block
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index b5574ca2a..068384a60 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -1482,13 +1482,7 @@ public class XmppConnectionService extends Service { } private void sendUnsentMessages(final Conversation conversation) { - conversation.findWaitingMessages(new Conversation.OnMessageFound() { - - @Override - public void onMessageFound(Message message) { - resendMessage(message, true); - } - }); + conversation.findWaitingMessages(message -> resendMessage(message, true)); } private void resendFailedFileMessages(final Conversation conversation) { @@ -3470,13 +3464,7 @@ public class XmppConnectionService extends Service { Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": reset 'sending' messages to 'waiting'"); for (Conversation conversation : getConversations()) { if (conversation.getAccount() == account) { - conversation.findUnsentTextMessages(new Conversation.OnMessageFound() { - - @Override - public void onMessageFound(Message message) { - markMessage(message, Message.STATUS_WAITING); - } - }); + conversation.findUnsentTextMessages(message -> markMessage(message, Message.STATUS_WAITING)); } } } |