always create a new list adapter to ensure proper scroll state

This commit is contained in:
tibbi
2018-01-08 15:50:52 +01:00
parent e41d5de4aa
commit 90c854dbf2
3 changed files with 21 additions and 24 deletions

View File

@ -261,7 +261,9 @@ class MainActivity : SimpleActivity() {
if (!wasBackJustPressed) {
wasBackJustPressed = true
toast(R.string.press_back_again)
Handler().postDelayed({ wasBackJustPressed = false }, BACK_PRESS_TIMEOUT.toLong())
Handler().postDelayed({
wasBackJustPressed = false
}, BACK_PRESS_TIMEOUT.toLong())
} else {
finish()
}
@ -318,7 +320,9 @@ class MainActivity : SimpleActivity() {
}
fun openedDirectory() {
MenuItemCompat.collapseActionView(searchMenuItem)
if (searchMenuItem != null) {
MenuItemCompat.collapseActionView(searchMenuItem)
}
}
private fun checkWhatsNewDialog() {