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:
@@ -133,6 +133,10 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
|
|||||||
|
|
||||||
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
|
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
|
||||||
|
|
||||||
|
val webUILauncher = rememberLauncherForActivityResult(
|
||||||
|
contract = ActivityResultContracts.StartActivityForResult()
|
||||||
|
) { viewModel.fetchModuleList() }
|
||||||
|
|
||||||
Scaffold(
|
Scaffold(
|
||||||
topBar = {
|
topBar = {
|
||||||
TopAppBar(
|
TopAppBar(
|
||||||
@@ -253,7 +257,7 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
|
|||||||
},
|
},
|
||||||
onClickModule = { id, name, hasWebUi ->
|
onClickModule = { id, name, hasWebUi ->
|
||||||
if (hasWebUi) {
|
if (hasWebUi) {
|
||||||
context.startActivity(
|
webUILauncher.launch(
|
||||||
Intent(context, WebUIActivity::class.java)
|
Intent(context, WebUIActivity::class.java)
|
||||||
.setData(Uri.parse("kernelsu://webui/$id"))
|
.setData(Uri.parse("kernelsu://webui/$id"))
|
||||||
.putExtra("id", id)
|
.putExtra("id", id)
|
||||||
|
|||||||
Reference in New Issue
Block a user