From a0b6e97f6231116270ee08dd745e871f5542e9f3 Mon Sep 17 00:00:00 2001 From: tibbi Date: Thu, 28 Jun 2018 19:59:21 +0200 Subject: [PATCH] adding some crashfixes --- .../com/simplemobiletools/gallery/activities/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 7e75bc0b7..f04462378 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt @@ -718,7 +718,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { } } } - } catch (ignored: ConcurrentModificationException) { + } catch (ignored: Exception) { } val foldersToScan = mediaFetcher.getFoldersToScan() @@ -776,7 +776,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener { sortedDirs = sortedDirs.distinctBy { it.path.getDistinctPath() } as ArrayList runOnUiThread { - (directories_grid.adapter as DirectoryAdapter).updateDirs(sortedDirs) + (directories_grid.adapter as? DirectoryAdapter)?.updateDirs(sortedDirs) } }