diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-10-23 21:27:41 +0200 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-10-23 21:27:41 +0200 |
commit | d73a77643d7923cae0789c5ed9f6a2a4cf41385f (patch) | |
tree | 14012cf90146a8a1feacd29cbc6fa6ad959ba1c2 /src/eu/siacs/conversations/services | |
parent | de3739970b32a927d8c1ec5f7a378fa50c4b4f99 (diff) |
context menu for messages. allow to resend single messages
Diffstat (limited to 'src/eu/siacs/conversations/services')
-rw-r--r-- | src/eu/siacs/conversations/services/XmppConnectionService.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/eu/siacs/conversations/services/XmppConnectionService.java b/src/eu/siacs/conversations/services/XmppConnectionService.java index 37e334eb..6d6c672e 100644 --- a/src/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/eu/siacs/conversations/services/XmppConnectionService.java @@ -1924,4 +1924,21 @@ public class XmppConnectionService extends Service { } } + + public void resendFailedMessages(Message message) { + List<Message> messages = new ArrayList<Message>(); + Message current = message; + while(current.getStatus() == Message.STATUS_SEND_FAILED) { + messages.add(current); + if (current.mergable(current.next())) { + current = current.next(); + } else { + break; + } + } + for(Message msg: messages) { + markMessage(msg, Message.STATUS_WAITING); + this.resendMessage(msg); + } + } } |