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 7aac66c64..57ab19dd6 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt
@@ -88,6 +88,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
MyScalableRecyclerView.mListener = null
}
+ override fun onStop() {
+ super.onStop()
+ config.temporarilyShowHidden = false
+ }
+
private fun tryloadGallery() {
if (hasWriteStoragePermission()) {
val dirName = getHumanizedFilename(mPath)
@@ -144,6 +149,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
R.id.hide_folder -> tryHideFolder()
R.id.unhide_folder -> unhideFolder()
R.id.exclude_folder -> tryExcludeFolder()
+ R.id.temporarily_show_hidden -> temporarilyShowHidden()
R.id.increase_column_count -> increaseColumnCount()
R.id.reduce_column_count -> reduceColumnCount()
R.id.settings -> launchSettings()
@@ -243,6 +249,11 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
false
}
+ private fun temporarilyShowHidden() {
+ config.temporarilyShowHidden = true
+ getMedia()
+ }
+
private fun handleZooming() {
val layoutManager = media_grid.layoutManager as GridLayoutManager
layoutManager.spanCount = config.mediaColumnCnt
diff --git a/app/src/main/res/menu/menu_media.xml b/app/src/main/res/menu/menu_media.xml
index cea56fba5..cfe7f81ab 100644
--- a/app/src/main/res/menu/menu_media.xml
+++ b/app/src/main/res/menu/menu_media.xml
@@ -32,6 +32,10 @@
android:id="@+id/exclude_folder"
android:title="@string/exclude"
app:showAsAction="never"/>
+