diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java index ad970ac95..12661b8c1 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java @@ -203,9 +203,9 @@ public class MainActivity extends SimpleActivity if (cursor != null && cursor.moveToFirst()) { final int pathIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATA); do { - final String path = cursor.getString(pathIndex); - final File file = new File(path); - final String fileDir = file.getParent(); + final String fullPath = cursor.getString(pathIndex); + final File file = new File(fullPath); + final String parentDir = file.getParent(); if (!file.exists()) { invalidFiles.add(file.getAbsolutePath()); @@ -214,14 +214,18 @@ public class MainActivity extends SimpleActivity final int dateIndex = cursor.getColumnIndex(MediaStore.Images.Media.DATE_TAKEN); final long timestamp = cursor.getLong(dateIndex); - if (directories.containsKey(fileDir)) { - final Directory directory = directories.get(fileDir); + if (directories.containsKey(parentDir)) { + final Directory directory = directories.get(parentDir); final int newImageCnt = directory.getMediaCnt() + 1; directory.setMediaCnt(newImageCnt); directory.addSize(file.length()); - } else if (!mToBeDeleted.contains(fileDir)) { - final String dirName = Utils.getFilename(fileDir); - directories.put(fileDir, new Directory(fileDir, path, dirName, 1, timestamp, file.length())); + } else if (!mToBeDeleted.contains(parentDir)) { + String dirName = Utils.getFilename(parentDir); + if (mConfig.getIsFolderHidden(parentDir)) { + dirName += " " + getResources().getString(R.string.hidden); + } + + directories.put(parentDir, new Directory(parentDir, fullPath, dirName, 1, timestamp, file.length())); } } while (cursor.moveToNext()); cursor.close(); diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 30acfe266..256df0845 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -33,6 +33,7 @@ No valid app found Hide folder Unhide folder + (hidden) 1 Ordner gelöscht diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml index 9a5e2627d..e8e3b7ca3 100644 --- a/app/src/main/res/values-es/strings.xml +++ b/app/src/main/res/values-es/strings.xml @@ -33,6 +33,7 @@ No valid app found Hide folder Unhide folder + (hidden) 1 carpeta eliminada diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 3f659fd02..61c510a39 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -33,6 +33,7 @@ No valid app found Hide folder Unhide folder + (hidden) 1 cartella eliminata diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 76d8dee89..45d2795f0 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -33,6 +33,7 @@ No valid app found Hide folder Unhide folder + (hidden) 1 フォルダーを削除しました diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index b198c8d6a..9333de115 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -33,6 +33,7 @@ No valid app found Hide folder Unhide folder + (hidden) 1 pasta eliminada diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 4d06fcd89..1f6e164b1 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -33,6 +33,7 @@ No valid app found Hide folder Unhide folder + (hidden) 1 mapp borttagen diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 814b1e3d2..b1206a7a6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -33,6 +33,7 @@ No valid app found Hide folder Unhide folder + (hidden) 1 folder deleted