diff options
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpRetrieveHead.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/download/HttpRetrieveHead.java | 8 |
1 files changed, 4 insertions, 4 deletions
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 1313bcca..62c1af59 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 @@ -10,6 +10,7 @@ import de.thedevstack.conversationsplus.http.Http; import de.thedevstack.conversationsplus.http.HttpClient; import de.thedevstack.conversationsplus.http.HttpHeadRetrievedListener; import de.thedevstack.conversationsplus.persistance.DatabaseBackend; +import de.thedevstack.conversationsplus.utils.MessageParserUtil; import de.thedevstack.conversationsplus.utils.MessageUtil; import de.thedevstack.conversationsplus.utils.UiUpdateHelper; import okhttp3.Call; @@ -36,12 +37,11 @@ public class HttpRetrieveHead implements Http, Callback { * If this code is reached and the URL is null something went wrong. * Try again to extract the file parameters from the message. */ - MessageUtil.extractFileParamsFromBody(message); + MessageParserUtil.extractFileParamsFromBody(message); this.url = (null != message.getFileParams()) ? message.getFileParams().getUrl() : null; if (null == this.url) { - message.setTreatAsDownloadable(Message.Decision.NEVER); // TODO find sth better if (null != message.getFileParams()) { - MessageUtil.setAndSaveFileStatus(message, FileStatus.UNDEFINED); + MessageUtil.setAndSaveFileStatus(message, FileStatus.NOT_FOUND); } } } @@ -89,7 +89,7 @@ public class HttpRetrieveHead implements Http, Callback { fileParams.setSize(size); fileParams.setMimeType(contentType); if (0 < size) { - fileParams.setFileStatus(FileStatus.NEEDS_DOWNLOAD); + MessageUtil.setFileStatus(message, FileStatus.NEEDS_DOWNLOAD); } DatabaseBackend.getInstance().updateMessage(message); UiUpdateHelper.updateConversationUi(); |