fetch files on the storage fragment on the background thread
This commit is contained in:
parent
f8831b150a
commit
b0cc764940
|
@ -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()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue