diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-10-03 22:31:55 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-10-03 22:31:55 +0200 |
commit | 26cc9dcbea89b5767c4c4c7dd3cfeb11a7ab168d (patch) | |
tree | e41b4f1b2521c325270600387dccd4091cb9a959 /src/main/java/de/pixart/messenger/persistance | |
parent | 8e088ccdb71495cf8bbd86919011296d2f7acde0 (diff) |
rework MediaViewerActivity
Diffstat (limited to 'src/main/java/de/pixart/messenger/persistance')
-rw-r--r-- | src/main/java/de/pixart/messenger/persistance/FileBackend.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/persistance/FileBackend.java b/src/main/java/de/pixart/messenger/persistance/FileBackend.java index 8397a7bb8..0333d24fd 100644 --- a/src/main/java/de/pixart/messenger/persistance/FileBackend.java +++ b/src/main/java/de/pixart/messenger/persistance/FileBackend.java @@ -111,8 +111,7 @@ public class FileBackend { } } - public boolean deleteFile(Message message) { - File file = getFile(message); + public boolean deleteFile(File file) { if (file.delete()) { updateMediaScanner(file); return true; @@ -121,6 +120,11 @@ public class FileBackend { } } + public boolean deleteFile(Message message) { + File file = getFile(message); + return deleteFile(file); + } + public DownloadableFile getFile(Message message) { return getFile(message, true); } @@ -219,8 +223,8 @@ public class FileBackend { } public static String getConversationsDirectory(final String type) { - if (type.equalsIgnoreCase("null") || type == null) { - return getAppMediaDirectory() + "Pix-Art Messenger" + "/"; + if (type.equalsIgnoreCase("null")) { + return Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + "Pix-Art Messenger" + "/"; } else { return getAppMediaDirectory() + "Pix-Art Messenger" + " " + type + "/"; } |