SearchFilter: Resolve ConcurrentModificationException
--- https://gitlab.com/AuroraOSS/AuroraStore/-/issues/839
This commit is contained in:
@@ -288,8 +288,11 @@ class SearchResultsFragment : BaseFragment(R.layout.fragment_search_result),
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun filter(appList: MutableList<App>): List<App> {
|
private fun filter(appList: MutableList<App>): List<App> {
|
||||||
|
val tempList:MutableList<App> = mutableListOf()
|
||||||
|
tempList.addAll(appList)
|
||||||
|
|
||||||
filter = FilterProvider.with(requireContext()).getSavedFilter()
|
filter = FilterProvider.with(requireContext()).getSavedFilter()
|
||||||
return appList
|
return tempList
|
||||||
.asSequence()
|
.asSequence()
|
||||||
.filter { it.displayName.isNotEmpty() } // Some of the apps may not have metadata
|
.filter { it.displayName.isNotEmpty() } // Some of the apps may not have metadata
|
||||||
.filter { if (!filter.paidApps) it.isFree else true }
|
.filter { if (!filter.paidApps) it.isFree else true }
|
||||||
|
|||||||
Reference in New Issue
Block a user