You've already forked KernelSU-Next
mirror of
https://github.com/KernelSU-Next/KernelSU-Next.git
synced 2025-08-27 23:46:34 +00:00
manager: fix module sorting state when module list is null initially before modules are fetched (this should fix #470)
This commit is contained in:
@@ -125,9 +125,9 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
|
||||
val prefs = context.getSharedPreferences("settings", Context.MODE_PRIVATE)
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
viewModel.sortAToZ = prefs.getBoolean("module_sort_a_to_z", true)
|
||||
viewModel.sortZToA = prefs.getBoolean("module_sort_z_to_a", false)
|
||||
if (viewModel.moduleList.isEmpty() || viewModel.isNeedRefresh) {
|
||||
viewModel.sortAToZ = prefs.getBoolean("module_sort_a_to_z", true)
|
||||
viewModel.sortZToA = prefs.getBoolean("module_sort_z_to_a", false)
|
||||
viewModel.fetchModuleList()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user