mirror of
https://github.com/Steffo99/twom.git
synced 2025-02-16 16:23:57 +00:00
Make onComplete a proper callback
This commit is contained in:
parent
c3760adff4
commit
0937c4ec45
1 changed files with 4 additions and 2 deletions
|
@ -23,7 +23,7 @@ import eu.steffo.twom.ui.BASE_PADDING
|
||||||
fun LoginActivityControl(
|
fun LoginActivityControl(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
onSelectHomeserver: () -> Unit = {},
|
onSelectHomeserver: () -> Unit = {},
|
||||||
onComplete: () -> Unit = {},
|
onComplete: (username: String, password: String) -> Unit = { _, _ -> },
|
||||||
) {
|
) {
|
||||||
|
|
||||||
var username by rememberSaveable { mutableStateOf("") }
|
var username by rememberSaveable { mutableStateOf("") }
|
||||||
|
@ -77,7 +77,9 @@ fun LoginActivityControl(
|
||||||
Row(BASE_PADDING) {
|
Row(BASE_PADDING) {
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
onClick = onComplete,
|
onClick = {
|
||||||
|
onComplete(username, password)
|
||||||
|
},
|
||||||
enabled = false,
|
enabled = false,
|
||||||
) {
|
) {
|
||||||
Text(LocalContext.current.getString(R.string.login_complete_text))
|
Text(LocalContext.current.getString(R.string.login_complete_text))
|
||||||
|
|
Loading…
Add table
Reference in a new issue