From 283a8254dcdcbd7d9bd73d887f8489dbcd763f7f Mon Sep 17 00:00:00 2001 From: tibbi Date: Wed, 20 Jun 2018 23:09:42 +0200 Subject: [PATCH] avoid some folder operations on Favorites --- .../gallery/adapters/DirectoryAdapter.kt | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt index 2a5712912..3eb4fd15d 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -144,11 +144,12 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList() - selectedPositions.forEach { paths.add(dirs[it].path) } - PropertiesDialog(activity, paths, config.shouldShowHidden) + PropertiesDialog(activity, getSelectedPaths().filter { it != FAVORITES }.toList(), config.shouldShowHidden) } } @@ -178,7 +179,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList 1) { activity.config.addExcludedFolders(paths) listener?.refreshItems() finishActMode() @@ -293,7 +294,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList