aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
index e700d6e9..e35c0f97 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/ConversationFragment.java
@@ -561,8 +561,16 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
|| (t != null && t instanceof HttpDownloadConnection)) {
copyUrl.setVisible(true);
}
+ boolean b1 = true;
+ b1 &= m.getType() == Message.TYPE_TEXT;
+ b1 &= t == null;
+ b1 &= m.treatAsDownloadable() != Message.Decision.NEVER;
+ boolean b2 = true;
+ b2 &= m.isFileOrImage();
+ b2 &= t instanceof TransferablePlaceholder;
+ b2 &= m.hasFileOnRemoteHost();
if ((m.getType() == Message.TYPE_TEXT && t == null && m.treatAsDownloadable() != Message.Decision.NEVER)
- || (m.isFileOrImage() && t instanceof TransferablePlaceholder && m.hasFileOnRemoteHost())){
+ || (t instanceof TransferablePlaceholder && m.hasFileOnRemoteHost())){
downloadFile.setVisible(true);
downloadFile.setTitle(activity.getString(R.string.download_x_file,UIHelper.getFileDescriptionString(activity, m)));
}