aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java
index bca0851a..ce1eb439 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationActivity.java
@@ -44,6 +44,7 @@ import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import de.thedevstack.android.logcat.Logging;
+import de.thedevstack.conversationsplus.services.filetransfer.FileTransferManager;
import de.thedevstack.conversationsplus.utils.AccountUtil;
import de.timroes.android.listview.EnhancedListView;
@@ -59,8 +60,6 @@ import de.thedevstack.conversationsplus.entities.Contact;
import de.thedevstack.conversationsplus.entities.Conversation;
import de.thedevstack.conversationsplus.entities.Message;
import de.thedevstack.conversationsplus.entities.Transferable;
-import de.thedevstack.conversationsplus.http.HttpConnectionManager;
-import de.thedevstack.conversationsplus.http.HttpDownloadConnection;
import de.thedevstack.conversationsplus.persistance.FileBackend;
import de.thedevstack.conversationsplus.services.XmppConnectionService;
import de.thedevstack.conversationsplus.services.XmppConnectionService.OnAccountUpdate;
@@ -624,8 +623,12 @@ public class ConversationActivity extends XmppActivity
Toast.makeText(this, R.string.not_connected_try_again, Toast.LENGTH_SHORT).show();
}
} else if (message.treatAsDownloadable() != Message.Decision.NEVER) {
- HttpDownloadConnection downloadConnection = HttpConnectionManager.createNewDownloadConnection(message, true);
- if (null == downloadConnection) {
+ FileTransferManager ftm = FileTransferManager.getInstance();
+ boolean created = false;
+ if (ftm.accept(message)) {
+ created = ftm.transferFile(message);
+ }
+ if (!created) {
Toast.makeText(this, R.string.file_not_on_remote_host, Toast.LENGTH_LONG).show();
}
}