diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-09-17 11:34:51 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-09-17 11:34:51 +0200 |
commit | 4450b2d934860811c053df9b2ddc3d13973e296d (patch) | |
tree | a3acd2cc236e1d15616748744a9209a1c1178efa /src/main/java/de/pixart | |
parent | c422e960a48d8edfa560b01c17e043e90fe9c120 (diff) |
dont show delete file button when outside conversations directory
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConversationFragment.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java index 1c9e215af..a9c29dd5c 100644 --- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java +++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java @@ -590,8 +590,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))); + } } } } |