From 68412e848080d489be4ef2c0a211d9c8af8e94ef Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Apr 2018 21:53:41 +0200 Subject: [PATCH] do not allow opening the freshly created folder while empty --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt index a90ed9e49..86a61e771 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -713,7 +713,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { initZoomListener() val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller DirectoryAdapter(this, dirs, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) { - itemClicked((it as Directory).path) + val path = (it as Directory).path + if (path != config.tempFolderPath) { + itemClicked(path) + } }.apply { setupZoomListener(mZoomListener) directories_grid.adapter = this