aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian.schneppe@pix-art.de>2020-01-02 10:22:40 +0100
committerChristian Schneppe <christian.schneppe@pix-art.de>2020-01-02 10:22:40 +0100
commit5aa52b08245f64507ddfc2630b4600bf7cb123ab (patch)
tree10472d6f6b1e12ae624171ead83c2c673869c2ed /src/main/java/de/pixart/messenger
parent8ca04b46e6663e2956fcd82785714ca3c93d1377 (diff)
reset file to normal message when attempting re-download after delete
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
index 4e1aa199a..4d3db9f8c 100644
--- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
+++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
@@ -77,6 +77,15 @@ public class HttpDownloadConnection implements Transferable {
}
public void init(boolean interactive) {
+ if (message.isFileDeleted()) {
+ if (message.getType() == Message.TYPE_PRIVATE_FILE) {
+ message.setType(Message.TYPE_PRIVATE);
+ } else if (message.isFileOrImage()) {
+ message.setType(Message.TYPE_TEXT);
+ }
+ message.setFileDeleted(false);
+ mXmppConnectionService.updateMessage(message);
+ }
this.message.setTransferable(this);
try {
final Message.FileParams fileParams = message.getFileParams();