mirror of
https://github.com/Steffo99/twom.git
synced 2024-11-21 23:54:26 +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(
|
||||
modifier: Modifier = Modifier,
|
||||
onSelectHomeserver: () -> Unit = {},
|
||||
onComplete: () -> Unit = {},
|
||||
onComplete: (username: String, password: String) -> Unit = { _, _ -> },
|
||||
) {
|
||||
|
||||
var username by rememberSaveable { mutableStateOf("") }
|
||||
|
@ -77,7 +77,9 @@ fun LoginActivityControl(
|
|||
Row(BASE_PADDING) {
|
||||
Button(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
onClick = onComplete,
|
||||
onClick = {
|
||||
onComplete(username, password)
|
||||
},
|
||||
enabled = false,
|
||||
) {
|
||||
Text(LocalContext.current.getString(R.string.login_complete_text))
|
||||
|
|
Loading…
Reference in a new issue