From dcfda61aba8f68c657d5316fb7fb107ed15fe3c4 Mon Sep 17 00:00:00 2001 From: inorichi Date: Tue, 16 Feb 2016 20:47:23 +0100 Subject: [PATCH] Always create nomedia file --- .../tachiyomi/data/preference/PreferencesHelper.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.java b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.java index 43a9f990d..4e93f1768 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.java +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.java @@ -42,10 +42,12 @@ public class PreferencesHelper { if (getDownloadsDirectory().equals(defaultDownloadsDir.getAbsolutePath()) && !defaultDownloadsDir.exists()) { defaultDownloadsDir.mkdirs(); - try { - new File(defaultDownloadsDir, ".nomedia").createNewFile(); - } catch (IOException e) { /* Ignore */ } } + + // Don't display downloaded chapters in gallery apps creating a ".nomedia" file + try { + new File(getDownloadsDirectory(), ".nomedia").createNewFile(); + } catch (IOException e) { /* Ignore */ } } private String getKey(int keyResource) {