implement callback for finish button click

This commit is contained in:
X1nto 2021-11-27 16:15:02 +04:00
parent ea8b359e9e
commit b6533e3b37
2 changed files with 6 additions and 2 deletions

View File

@ -138,7 +138,10 @@ class MainActivity : ComponentActivity() {
InstallScreen(
appName = screen.appName,
appVersions = screen.appVersions,
viewModel = installViewModel
viewModel = installViewModel,
onFinishClick = {
backStack.newRoot(Screen.Home)
}
)
}
}

View File

@ -43,6 +43,7 @@ fun InstallScreen(
appName: String,
appVersions: List<String>?,
viewModel: InstallViewModel,
onFinishClick: () -> Unit
) {
var startedProcess by rememberSaveable { mutableStateOf(false) }
@ -82,7 +83,7 @@ fun InstallScreen(
icon = {
Icon(Icons.Rounded.Done, null)
},
onClick = { /*TODO*/ },
onClick = onFinishClick,
)
}
}