From 07629186738a3bdd129108065b57359897a6c1ae Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 24 Apr 2018 09:35:31 +0200 Subject: [PATCH] fix switching between grid and list view types --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 3 ++- 1 file changed, 2 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 ce85caaa2..ffc071dcd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -323,8 +323,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { config.viewTypeFolders = it as Int invalidateOptionsMenu() setupLayoutManager() + val dirs = getCurrentlyDisplayedDirs() directories_grid.adapter = null - setupAdapter(getCurrentlyDisplayedDirs()) + setupAdapter(dirs) } }