Skip to content

Commit b0cc764

Browse files
committed
fetch files on the storage fragment on the background thread
1 parent f8831b1 commit b0cc764

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,10 @@ class StorageFragment(context: Context, attributeSet: AttributeSet) : MyViewPage
377377
private fun getRecyclerAdapter() = search_results_list.adapter as? ItemsAdapter
378378

379379
override fun refreshFragment() {
380-
val fileDirItems = getAllFiles()
381-
allDeviceListItems = getListItemsFromFileDirItems(fileDirItems)
380+
ensureBackgroundThread {
381+
val fileDirItems = getAllFiles()
382+
allDeviceListItems = getListItemsFromFileDirItems(fileDirItems)
383+
}
382384
setupLayoutManager()
383385
}
384386

0 commit comments

Comments
 (0)