fetch files on the storage fragment on the background thread
This commit is contained in:
parent
f8831b150a
commit
b0cc764940
1 changed files with 4 additions and 2 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue