aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java4
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
index 308ec0605..b625067e3 100644
--- a/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
+++ b/src/main/java/de/pixart/messenger/http/HttpDownloadConnection.java
@@ -380,9 +380,9 @@ public class HttpDownloadConnection implements Transferable {
connection.setUseCaches(false);
connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getUserAgent());
connection.setRequestProperty("Accept-Encoding", "identity");
- final boolean tryResume = file.exists() && file.getKey() == null && file.getSize() > 0;
+ final long expected = file.getExpectedSize();
+ final boolean tryResume = file.exists() && file.getKey() == null && file.getSize() > 0 && file.getSize() < expected;
long resumeSize = 0;
- long expected = file.getExpectedSize();
if (tryResume) {
resumeSize = file.getSize();
Log.d(Config.LOGTAG, "http download trying resume after" + resumeSize + " of " + expected);
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index d907f58a4..d09abc6f2 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -1670,7 +1670,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
Log.d(Config.LOGTAG, "type: " + transferable.getClass().getName());
Toast.makeText(getActivity(), R.string.not_connected_try_again, Toast.LENGTH_SHORT).show();
}
- } else if (message.treatAsDownloadable()) {
+ } else if (message.treatAsDownloadable() || message.hasFileOnRemoteHost()) {
createNewConnection(message);
}
}