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:
WenHao2130
2025-07-24 19:43:56 +08:00
committed by GitHub
parent 5ba4f73eeb
commit 115206bcc6

View File

@@ -843,10 +843,8 @@ private fun ModuleList(
}, },
onCheckChanged = { onCheckChanged = {
scope.launch { scope.launch {
val success = loadingDialog.withLoading { val success = withContext(Dispatchers.IO) {
withContext(Dispatchers.IO) { toggleModule(module.dirId, !module.enabled)
toggleModule(module.dirId, !module.enabled)
}
} }
if (success) { if (success) {
viewModel.fetchModuleList() viewModel.fetchModuleList()