adding some crashfixes

This commit is contained in:
tibbi 2018-06-28 19:59:21 +02:00
parent 89c1414165
commit a0b6e97f62

View file

@ -718,7 +718,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
} }
} }
} }
} catch (ignored: ConcurrentModificationException) { } catch (ignored: Exception) {
} }
val foldersToScan = mediaFetcher.getFoldersToScan() val foldersToScan = mediaFetcher.getFoldersToScan()
@ -776,7 +776,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
sortedDirs = sortedDirs.distinctBy { it.path.getDistinctPath() } as ArrayList<Directory> sortedDirs = sortedDirs.distinctBy { it.path.getDistinctPath() } as ArrayList<Directory>
runOnUiThread { runOnUiThread {
(directories_grid.adapter as DirectoryAdapter).updateDirs(sortedDirs) (directories_grid.adapter as? DirectoryAdapter)?.updateDirs(sortedDirs)
} }
} }