From a9bbe6599946cb63b3d784774e15f3cd2f0266ab Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 18 Dec 2018 10:00:21 +0100 Subject: [PATCH] make sure we update the adapter on the main thread --- .../simplemobiletools/gallery/pro/activities/MainActivity.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index a40906bbe..eab222979 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -984,7 +984,9 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener { } }.apply { setupZoomListener(mZoomListener) - directories_grid.adapter = this + runOnUiThread { + directories_grid.adapter = this + } } measureRecyclerViewContent(dirsToShow) setupScrollDirection()