fetch files on the storage fragment on the background thread

This commit is contained in:
tibbi 2023-01-11 15:18:48 +01:00
parent f8831b150a
commit b0cc764940

View file

@ -377,8 +377,10 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
private fun getRecyclerAdapter() = search_results_list.adapter as? ItemsAdapter
override fun refreshFragment() {
val fileDirItems = getAllFiles()
allDeviceListItems = getListItemsFromFileDirItems(fileDirItems)
ensureBackgroundThread {
val fileDirItems = getAllFiles()
allDeviceListItems = getListItemsFromFileDirItems(fileDirItems)
}
setupLayoutManager()
}