diff options
Diffstat (limited to '')
4 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java b/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java index 963adfe4..bad0415f 100644 --- a/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java +++ b/src/main/java/de/thedevstack/conversationsplus/services/XmppConnectionService.java @@ -2415,7 +2415,8 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } public void resendFailedMessages(final Message message) { - if (message.getStatus() == Message.STATUS_SEND_FAILED) { + if (message.getStatus() == Message.STATUS_SEND_FAILED + || message.getStatus() == Message.STATUS_SEND_CANCELED) { message.setTime(System.currentTimeMillis()); MessageUtil.markMessage(message, Message.STATUS_WAITING); this.resendMessage(message, false); 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); } } } |