From a385be80a8f1c324ea831768ee0db5e6e0ffeb73 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 11 Feb 2020 10:06:53 +0100 Subject: [PATCH] use parent path at folder sorting --- .../com/simplemobiletools/gallery/pro/extensions/Context.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt index 8da181faf..08ad5f80e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt @@ -887,7 +887,7 @@ fun Context.getDirectorySortingValue(media: ArrayList, path: String, nam val sorting = config.directorySorting val sorted = when { sorting and SORT_BY_NAME != 0 -> return name - sorting and SORT_BY_PATH != 0 -> return path + sorting and SORT_BY_PATH != 0 -> return path.getParentPath() sorting and SORT_BY_SIZE != 0 -> return size.toString() sorting and SORT_BY_DATE_MODIFIED != 0 -> media.sortedBy { it.modified } sorting and SORT_BY_DATE_TAKEN != 0 -> media.sortedBy { it.taken }