Skip to content

Commit

Permalink
manager: module: refresh after webui usage (tiann#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanyee33 authored and wodanesdag committed Dec 26, 2024
1 parent 8acee00 commit 6c7f9ca
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 6c7f9ca

Please sign in to comment.