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
1 changed files with 4 additions and 2 deletions

View File

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