measure recyclerview on items update + crashfix

This commit is contained in:
tibbi 2018-05-15 10:24:14 +02:00
parent 744af8a8e6
commit 3771cc4c31

View file

@ -430,6 +430,10 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
}
private fun deleteFiles() {
if (selectedPositions.isEmpty()) {
return
}
val files = ArrayList<FileDirItem>(selectedPositions.size)
val removeFiles = ArrayList<FileDirItem>(selectedPositions.size)
val SAFPath = fileDirItems[selectedPositions.first()].path
@ -465,6 +469,7 @@ class ItemsAdapter(activity: SimpleActivity, var fileDirItems: MutableList<FileD
fileDirItems = newItems.clone() as ArrayList<FileDirItem>
notifyDataSetChanged()
finishActMode()
fastScroller?.measureRecyclerView()
}
}