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

View file

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