aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-09-19 21:49:32 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-19 21:49:32 +0200
commit32ec1789762241c3b2463b2e662084ce2eff399a (patch)
treed6bec25d243e620fae5095c156f3c742a80d33f7 /src/main/java/de/pixart/messenger/ui
parent28aa17ddbe73605ada1355f9ddd2099fd5d1ef62 (diff)
allow deleting file inside messengers storage path
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationFragment.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
index a9c29dd5c..3f79e01d7 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationFragment.java
@@ -55,6 +55,7 @@ import de.pixart.messenger.entities.Presence;
import de.pixart.messenger.entities.Transferable;
import de.pixart.messenger.entities.TransferablePlaceholder;
import de.pixart.messenger.http.HttpDownloadConnection;
+import de.pixart.messenger.persistance.FileBackend;
import de.pixart.messenger.services.MessageArchiveService;
import de.pixart.messenger.services.XmppConnectionService;
import de.pixart.messenger.ui.XmppActivity.OnPresenceSelected;
@@ -591,7 +592,8 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
}
if (treatAsFile) {
String path = m.getRelativeFilePath();
- if (path == null || !path.startsWith("/")) {
+ Log.d(Config.LOGTAG, "Path = " + path);
+ if (path == null || !path.startsWith("/") || path.contains(FileBackend.getConversationsDirectory())) {
deleteFile.setVisible(true);
deleteFile.setTitle(activity.getString(R.string.delete_x_file, UIHelper.getFileDescriptionString(activity, m)));
}