diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Conversation.java | 2 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/entities/Message.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java index 4a7b45088..db06ecb93 100644 --- a/src/main/java/de/pixart/messenger/entities/Conversation.java +++ b/src/main/java/de/pixart/messenger/entities/Conversation.java @@ -1000,7 +1000,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl for (int i = this.messages.size() - 1; i >= 0; --i) { Message message = this.messages.get(i); if ((message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE) && message.getEncryption() != Message.ENCRYPTION_PGP) { - if (message.getStatus() == Message.STATUS_SEND_FAILED){ + if (message.getStatus() == Message.STATUS_SEND_FAILED && !message.isDeleted()){ ++count; } } diff --git a/src/main/java/de/pixart/messenger/entities/Message.java b/src/main/java/de/pixart/messenger/entities/Message.java index 0936c86c8..59073cb77 100644 --- a/src/main/java/de/pixart/messenger/entities/Message.java +++ b/src/main/java/de/pixart/messenger/entities/Message.java @@ -804,6 +804,10 @@ public class Message extends AbstractEntity { return type == TYPE_FILE || type == TYPE_IMAGE; } + public boolean isDeleted() { + return (type == TYPE_FILE || type == TYPE_IMAGE) && getTransferable() != null && getTransferable().getFileSize() == 0; + } + public boolean hasFileOnRemoteHost() { return isFileOrImage() && getFileParams().url != null; } |