diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-09-16 12:29:12 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-09-16 12:29:12 +0200 |
commit | 521469a57d9c2477bdb89ceb4b5e93f7d3ca800e (patch) | |
tree | 6135c68844bbe49ec097d809fd1ad321a017ec7c /src/main | |
parent | 3cdf5f9afc13cf1b169b30d674505f33823367a1 (diff) |
dont show delete file button when outside conversations directory. fixes #2007
Diffstat (limited to '')
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationFragment.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java index 80b5ff82..c6f6b8cd 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java @@ -579,8 +579,11 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa cancelTransmission.setVisible(true); } if (treatAsFile) { - deleteFile.setVisible(true); - deleteFile.setTitle(activity.getString(R.string.delete_x_file,UIHelper.getFileDescriptionString(activity, m))); + String path = m.getRelativeFilePath(); + if (path == null || !path.startsWith("/")) { + deleteFile.setVisible(true); + deleteFile.setTitle(activity.getString(R.string.delete_x_file, UIHelper.getFileDescriptionString(activity, m))); + } } } } |