diff --git a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt index 377914ab..5cec5bd3 100644 --- a/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/filemanager/pro/fragments/StorageFragment.kt @@ -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() }