make sure we setup the scroll direction at main screen from the main thread

This commit is contained in:
tibbi 2018-12-18 10:02:35 +01:00
parent 82ca23935a
commit 2789702ad7

View file

@ -986,10 +986,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
setupZoomListener(mZoomListener) setupZoomListener(mZoomListener)
runOnUiThread { runOnUiThread {
directories_grid.adapter = this directories_grid.adapter = this
setupScrollDirection()
} }
} }
measureRecyclerViewContent(dirsToShow) measureRecyclerViewContent(dirsToShow)
setupScrollDirection()
} else { } else {
if (textToSearch.isNotEmpty()) { if (textToSearch.isNotEmpty()) {
dirsToShow = dirsToShow.filter { it.name.contains(textToSearch, true) }.sortedBy { !it.name.startsWith(textToSearch, true) }.toMutableList() as ArrayList dirsToShow = dirsToShow.filter { it.name.contains(textToSearch, true) }.sortedBy { !it.name.startsWith(textToSearch, true) }.toMutableList() as ArrayList