diff --git a/app/src/main/java/me/bmax/apatch/ui/screen/APM.kt b/app/src/main/java/me/bmax/apatch/ui/screen/APM.kt index 53944070e..79f0c204d 100644 --- a/app/src/main/java/me/bmax/apatch/ui/screen/APM.kt +++ b/app/src/main/java/me/bmax/apatch/ui/screen/APM.kt @@ -125,7 +125,9 @@ fun APModuleScreen(navigator: DestinationsNavigator) { viewModel.fetchModuleList() } } - + val webUILauncher = rememberLauncherForActivityResult( + contract = ActivityResultContracts.StartActivityForResult() + ) { viewModel.fetchModuleList() } //TODO: FIXME -> val isSafeMode = Natives.getSafeMode() val isSafeMode = false val hasMagisk = hasMagisk() @@ -201,7 +203,7 @@ fun APModuleScreen(navigator: DestinationsNavigator) { }, onClickModule = { id, name, hasWebUi -> if (hasWebUi) { - context.startActivity( + webUILauncher.launch( Intent( context, WebUIActivity::class.java ).setData(Uri.parse("apatch://webui/$id")).putExtra("id", id)