manager: module: refresh after webui usage (#2317)

- This commit fixes issue tiann#2250

https://github.com/user-attachments/assets/19dcca12-cb34-4e6e-88b4-72c26c2773f3

Tested by: backslashxx <118538522+backslashxx@users.noreply.github.com>
This commit is contained in:
bryanyee33
2024-12-26 16:10:16 +08:00
committed by Rifat Azad
parent 95828ed54a
commit 9224f6bd8b

View File

@@ -128,6 +128,10 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
var zipUri by remember { mutableStateOf<Uri?>(null) }
var showConfirmDialog by remember { mutableStateOf(false) }
val webUILauncher = rememberLauncherForActivityResult(
contract = ActivityResultContracts.StartActivityForResult()
) { viewModel.fetchModuleList() }
Scaffold(
topBar = {
TopAppBar(
@@ -226,7 +230,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
},
onClickModule = { id, name, hasWebUi ->
if (hasWebUi) {
context.startActivity(
webUILauncher.launch(
Intent(context, WebUIActivity::class.java)
.setData(Uri.parse("kernelsu-next://webui/$id"))
.putExtra("id", id)