From f354818b6676d209467689f72c8fa4d479917dbf Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 26 Feb 2017 19:15:51 +0100 Subject: [PATCH] show an explanation dialog at first attempt to exclude a folder --- .../gallery/activities/MediaActivity.kt | 14 +++++++++++++- .../gallery/adapters/DirectoryAdapter.kt | 13 ++++++++++++- app/src/main/res/values-ca-rES/strings.xml | 2 +- app/src/main/res/values-de/strings.xml | 2 +- app/src/main/res/values-es-rES/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-gl-rES/strings.xml | 2 +- app/src/main/res/values-it/strings.xml | 2 +- app/src/main/res/values-ja/strings.xml | 2 +- app/src/main/res/values-pt-rPT/strings.xml | 2 +- app/src/main/res/values-ru/strings.xml | 2 +- app/src/main/res/values-sk/strings.xml | 2 +- app/src/main/res/values-sv/strings.xml | 2 +- app/src/main/res/values-tr/strings.xml | 2 +- app/src/main/res/values-zh-rCN/strings.xml | 2 +- app/src/main/res/values-zh-rTW/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 17 files changed, 40 insertions(+), 17 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt index 348284271..c9400fa73 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -15,6 +15,7 @@ import com.bumptech.glide.request.animation.GlideAnimation import com.bumptech.glide.request.target.SimpleTarget import com.google.gson.Gson import com.google.gson.reflect.TypeToken +import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.gallery.R import com.simplemobiletools.gallery.adapters.MediaAdapter @@ -119,7 +120,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { R.id.folder_view -> switchToFolderView() R.id.hide_folder -> hideFolder() R.id.unhide_folder -> unhideFolder() - R.id.exclude_folder -> excludeFolder() + R.id.exclude_folder -> tryExcludeFolder() R.id.increase_column_count -> increaseColumnCount() R.id.reduce_column_count -> reduceColumnCount() R.id.settings -> launchSettings() @@ -166,6 +167,17 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { } } + private fun tryExcludeFolder() { + if (config.wasExcludeFolderTooltipShown) { + excludeFolder() + } else { + ConfirmationDialog(this, getString(R.string.exclude_folder_description)) { + config.wasExcludeFolderTooltipShown = true + excludeFolder() + } + } + } + private fun excludeFolder() { } 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 4797838f5..fee67945e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -78,7 +78,7 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList pinFolders(false) R.id.cab_hide -> toggleFoldersVisibility(true) R.id.cab_unhide -> toggleFoldersVisibility(false) - R.id.exclude_folder -> excludeFolder() + R.id.cab_exclude -> tryExcludeFolder() R.id.cab_copy_move -> displayCopyDialog() R.id.cab_select_all -> selectAll() R.id.cab_delete -> askConfirmDelete() @@ -185,6 +185,17 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableListThis function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Resize diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index a3a27d664..255bf3c09 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Größe ändern diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 8fa377dd0..62d50e9ad 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Resize diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index 5dd7e2e0a..a28254f85 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Redimensionner diff --git a/app/src/main/res/values-gl-rES/strings.xml b/app/src/main/res/values-gl-rES/strings.xml index 8fa377dd0..62d50e9ad 100644 --- a/app/src/main/res/values-gl-rES/strings.xml +++ b/app/src/main/res/values-gl-rES/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Resize diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml index 98a7e41b5..8455c1ab9 100644 --- a/app/src/main/res/values-it/strings.xml +++ b/app/src/main/res/values-it/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Resize diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml index 0b7773595..c5e5f50d3 100644 --- a/app/src/main/res/values-ja/strings.xml +++ b/app/src/main/res/values-ja/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Resize diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index 2322d5dc7..97fedc41d 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Redimensionar diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index bc17a21ad..8717bddbb 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Изменить размер diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml index d3593428d..092da0b68 100644 --- a/app/src/main/res/values-sk/strings.xml +++ b/app/src/main/res/values-sk/strings.xml @@ -28,7 +28,7 @@ Táto funkcia skryje priečinok pridaním súboru \'.nomedia\'. Stále ho môžete vidieť zvolením možnosti \'Zobraziť skryté priečinky\' v nastaveniach. Pokračovať? Vylúčiť Vylúčené priečinky - Táto funkcia ukryje priečinok iba pred Jednoduchou galériou. Spravovať vylúčené priečinky je možné v nastaveniach. Pokračovať? + Táto funkcia ukryje výber iba pred Jednoduchou galériou. Spravovať vylúčené priečinky je možné v nastaveniach. Pokračovať? Zmeniť veľkosť diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml index 8bfea03c7..f1bc5183c 100644 --- a/app/src/main/res/values-sv/strings.xml +++ b/app/src/main/res/values-sv/strings.xml @@ -26,7 +26,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Ändra storlek diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 19693baaf..744920ed9 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Yeniden boyutlandır diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 8f1111a51..00c1e746b 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? 缩放 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 58ce7f4e8..46f4ddb55 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? 縮放 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cc829c31d..23d4251f5 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -28,7 +28,7 @@ This function hides the folder by adding a \'.nomedia\' file into it. You can still see it by toggling \'Show hidden folders\' option in Settings. Continue? Exclude Excluded folders - This function will make this folder hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? + This function will make the selection hidden only for Simple Gallery. You can manage hidden folders in Settings. Continue? Resize