aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/services/filetransfer
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/services/filetransfer')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/filetransfer/FileTransferManager.java2
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpFileDownloadCallback.java1
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpRetrieveHead.java2
3 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/FileTransferManager.java b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/FileTransferManager.java
index b99f8d82..63f1547f 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/FileTransferManager.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/FileTransferManager.java
@@ -134,7 +134,7 @@ public class FileTransferManager implements FileTransferStatusListener {
@Override
public void onCancel(FileTransferEntity entity) {
this.activeTransfers.remove(entity.getMessage().getUuid());
- MessageUtil.markMessage(entity.getMessage(), Message.STATUS_SEND_FAILED); // TODO New Status CANCELED!
+ MessageUtil.markMessage(entity.getMessage(), Message.STATUS_SEND_CANCELED);
}
@Override
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpFileDownloadCallback.java b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpFileDownloadCallback.java
index 2c31754c..18c13a3f 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpFileDownloadCallback.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpFileDownloadCallback.java
@@ -41,6 +41,7 @@ public class HttpFileDownloadCallback implements Callback {
StreamUtil.close(os);
FileBackend.updateMediaScanner(file, XmppConnectionServiceAccessor.xmppConnectionService);
this.entity.transferred();
+ MessageUtil.updateFileParams(this.entity.getMessage());
changeStatus(FileStatus.DOWNLOADED);
} else {
Logging.e("http-download", "Failed to retrieve file from remote host. HTTP response: " + response.code() + ", " + response.body().string());
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpRetrieveHead.java b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpRetrieveHead.java
index 8d23d9c0..1313bcca 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpRetrieveHead.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpRetrieveHead.java
@@ -41,7 +41,7 @@ public class HttpRetrieveHead implements Http, Callback {
if (null == this.url) {
message.setTreatAsDownloadable(Message.Decision.NEVER); // TODO find sth better
if (null != message.getFileParams()) {
- MessageUtil.setAndSaveFileStatus(message, FileStatus.NOT_FOUND);
+ MessageUtil.setAndSaveFileStatus(message, FileStatus.UNDEFINED);
}
}
}