manager: Remove Loading Dialog when enable/disable the module (#291)
Magic Mount is fast enough that there is almost no need to display a loading animation while waiting for the backend to finish processing. Signed-off-by: WenHao2130 <wenhao2130@outlook.com>
This commit is contained in:
@@ -843,10 +843,8 @@ private fun ModuleList(
|
||||
},
|
||||
onCheckChanged = {
|
||||
scope.launch {
|
||||
val success = loadingDialog.withLoading {
|
||||
withContext(Dispatchers.IO) {
|
||||
toggleModule(module.dirId, !module.enabled)
|
||||
}
|
||||
val success = withContext(Dispatchers.IO) {
|
||||
toggleModule(module.dirId, !module.enabled)
|
||||
}
|
||||
if (success) {
|
||||
viewModel.fetchModuleList()
|
||||
|
||||
Reference in New Issue
Block a user