diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-11-11 13:51:15 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-11-11 13:51:15 +0100 |
commit | b38fe1e8f0a9a1aa479b4a61f65f61ae78db6665 (patch) | |
tree | 3cd92b820a39ee463fca74a92841b3a31e3f6062 /src/main/java/de/pixart/messenger/entities/Conversation.java | |
parent | 13586d7b797cd6ce9ec967e2657a0180340dcfb5 (diff) |
implement message deletion
fixed #208
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 1e5224489..db6006ca3 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -222,6 +222,20 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl } } + public void findDeletedMessages(final OnMessageFound onMessageFound) { + final ArrayList<Message> results = new ArrayList<>(); + synchronized (this.messages) { + for (final Message m : this.messages) { + if (m.isDeleted()) { + results.add(m); + } + } + } + for (Message result : results) { + onMessageFound.onMessageFound(result); + } + } + public Message findMessageWithFileAndUuid(final String uuid) { synchronized (this.messages) { for (final Message message : this.messages) { |