aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-01-11 14:55:53 +0100
committersteckbrief <steckbrief@chefmail.de>2017-01-11 14:55:53 +0100
commit0a9bba28616e594279cd659ec2eb57da2074b3cd (patch)
treecb643f89080eee8745be1ee6590429488400f6c1 /src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
parent563fcfa77580292a7ff2360eea20553743bd0ae7 (diff)
Improved error handling for filetransfer:http:delete, Check for httpupload feature available extended to include filetransfer:http as well, method to check if http upload is available moved from data class 'Account' to 'AccountUtil'
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
index aad15f51..157e6dc3 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
@@ -69,8 +69,7 @@ import de.thedevstack.conversationsplus.ui.adapter.MessageAdapter.OnContactPictu
import de.thedevstack.conversationsplus.ui.adapter.MessageAdapter.OnContactPictureLongClicked;
import de.thedevstack.conversationsplus.ui.listeners.ConversationSwipeRefreshListener;
import de.thedevstack.conversationsplus.ui.listeners.DeleteFileCallback;
-import de.thedevstack.conversationsplus.ui.listeners.SimpleUserDecisionCallback;
-import de.thedevstack.conversationsplus.ui.listeners.UserDecisionListener;
+import de.thedevstack.conversationsplus.utils.AccountUtil;
import de.thedevstack.conversationsplus.utils.GeoHelper;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.utils.UIHelper;
@@ -578,7 +577,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
deleteFile.setVisible(true);
deleteFile.setTitle(activity.getString(R.string.delete_x_file,UIHelper.getFileDescriptionString(activity, m)));
}
- if (m.isHttpUploaded() && MessageUtil.isMessageSent(m)) {
+ if (m.isHttpUploaded() && MessageUtil.isMessageSent(m) && AccountUtil.isFileTransferHttpAvailable(m.getConversation().getAccount())) {
MenuItem deleteRemoteFile = menu.findItem(R.id.msg_ctx_menu_delete_remote_file);
deleteRemoteFile.setVisible(true);
}
@@ -1038,7 +1037,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
final String text = this.mEditMessage == null ? "" : this.mEditMessage.getText().toString();
final boolean empty = text.length() == 0;
final boolean conference = c.getMode() == Conversation.MODE_MULTI;
- if (conference && !c.getAccount().httpUploadAvailable()) {
+ if (conference && !AccountUtil.isHttpUploadAvailable(c.getAccount())) {
if (empty && c.getNextCounterpart() != null) {
action = SendButtonAction.CANCEL;
} else {