diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-07-25 14:15:47 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-07-25 19:50:19 +0200 |
commit | e388c64361a3dad44442dd1f8633e452302188e8 (patch) | |
tree | bfc9b12da582a92af1296e04ac032ee8a3263a22 /src/main/java/eu/siacs/conversations/entities | |
parent | 3fbee39579b4b2232fc98d50f6b16ec4f9f33022 (diff) |
refactored how view intents are handled
processing view intents before saved instance caused troubles when the activity was destroyed
fixes #1969
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/entities/Conversation.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java index c3294f774..ee47f87a0 100644 --- a/src/main/java/eu/siacs/conversations/entities/Conversation.java +++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java @@ -158,9 +158,9 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl public Message findMessageWithFileAndUuid(final String uuid) { synchronized (this.messages) { for (final Message message : this.messages) { - if ((message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE) + if (message.getUuid().equals(uuid) && message.getEncryption() != Message.ENCRYPTION_PGP - && message.getUuid().equals(uuid)) { + && (message.getType() == Message.TYPE_IMAGE || message.getType() == Message.TYPE_FILE || message.treatAsDownloadable() != Message.Decision.NEVER)) { return message; } } |