fixing a crash at changing the column count

This commit is contained in:
tibbi 2018-07-01 11:56:23 +02:00
parent b05919f7ec
commit 6437970df8
1 changed files with 3 additions and 1 deletions

View File

@ -534,7 +534,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
private fun columnCountChanged() { private fun columnCountChanged() {
invalidateOptionsMenu() invalidateOptionsMenu()
directories_grid.adapter?.notifyDataSetChanged() directories_grid.adapter?.notifyDataSetChanged()
measureRecyclerViewContent(getRecyclerAdapter()!!.dirs) getRecyclerAdapter()?.dirs?.apply {
measureRecyclerViewContent()
}
} }
private fun isPickImageIntent(intent: Intent) = isPickIntent(intent) && (hasImageContentData(intent) || isImageType(intent)) private fun isPickImageIntent(intent: Intent) = isPickIntent(intent) && (hasImageContentData(intent) || isImageType(intent))