diff --git a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt index ddb720e0..6d7315c8 100644 --- a/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt +++ b/manager/app/src/main/java/com/rifsxd/ksunext/ui/screen/Module.kt @@ -603,6 +603,7 @@ private fun ModuleList( updatedModule.first, "${module.name}-${updatedModule.second}.zip" ) + viewModel.markNeedRefresh() } }, onClick = { @@ -688,14 +689,14 @@ fun ModuleItem( ) if (module.remove) { LabelItem( - text = stringResource(R.string.uninstall), + text = stringResource(R.string.uninstalled), style = com.dergoogler.mmrl.ui.component.LabelItemDefaults.style.copy( containerColor = MaterialTheme.colorScheme.errorContainer, contentColor = MaterialTheme.colorScheme.onErrorContainer ) ) } - if (updateUrl.isNotEmpty() && !module.remove) { + if (updateUrl.isNotEmpty() && !module.remove && !module.update) { LabelItem( text = stringResource(R.string.module_update), style = com.dergoogler.mmrl.ui.component.LabelItemDefaults.style.copy( @@ -704,6 +705,17 @@ fun ModuleItem( ) ) } + if (!module.remove) { + if (module.update) { + LabelItem( + text = stringResource(R.string.module_updated), + style = com.dergoogler.mmrl.ui.component.LabelItemDefaults.style.copy( + containerColor = MaterialTheme.colorScheme.tertiaryContainer, + contentColor = MaterialTheme.colorScheme.onTertiaryContainer + ) + ) + } + } if (module.hasWebUi) { LabelItem( text = stringResource(R.string.webui), @@ -802,7 +814,9 @@ fun ModuleItem( onUpdate(module) } ) + HorizontalDivider() } + if (module.hasWebUi) { DropdownMenuItem( text = { Text(stringResource(R.string.webui)) }, @@ -823,11 +837,7 @@ fun ModuleItem( ) } - if ( - (updateUrl.isNotEmpty() && !module.remove) || - module.hasWebUi || - module.hasActionScript - ) { + if (module.hasWebUi || module.hasActionScript ) { HorizontalDivider() } diff --git a/manager/app/src/main/res/values/strings.xml b/manager/app/src/main/res/values/strings.xml index 2a79c7d6..1a523a03 100644 --- a/manager/app/src/main/res/values/strings.xml +++ b/manager/app/src/main/res/values/strings.xml @@ -52,6 +52,7 @@ Install Install Reboot + Uninstalled Settings Soft Reboot Reboot to Recovery @@ -137,6 +138,7 @@ Domain Rules Update + Updated Downloading module: %s Start downloading: %s New version %s is available, click to upgrade.