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 bb5174ba1..c504b1ead 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt @@ -124,7 +124,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { R.id.toggle_filename -> toggleFilenameVisibility() R.id.open_camera -> launchCamera() R.id.folder_view -> switchToFolderView() - R.id.hide_folder -> hideFolder() + R.id.hide_folder -> tryHideFolder() R.id.unhide_folder -> unhideFolder() R.id.exclude_folder -> tryExcludeFolder() R.id.increase_column_count -> increaseColumnCount() @@ -153,6 +153,17 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener { finish() } + private fun tryHideFolder() { + if (config.wasHideFolderTooltipShown) { + hideFolder() + } else { + ConfirmationDialog(this, getString(R.string.hide_folder_description)) { + config.wasHideFolderTooltipShown = true + hideFolder() + } + } + } + private fun hideFolder() { addNoMedia(mPath) { runOnUiThread { 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 009cdc287..7a24b298f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/adapters/DirectoryAdapter.kt @@ -174,8 +174,13 @@ class DirectoryAdapter(val activity: SimpleActivity, val dirs: MutableList