Moves Relay and User Metadata update buttons from Post to Save.

This commit is contained in:
Vitor Pamplona 2023-10-23 11:30:33 -04:00
parent 10a0dc7f8a
commit 5b0fc7982b
3 changed files with 5 additions and 9 deletions

View File

@ -1279,12 +1279,9 @@ fun PostButton(onPost: () -> Unit = {}, isActive: Boolean, modifier: Modifier =
Button(
modifier = modifier,
enabled = isActive,
onClick = {
onPost()
},
shape = ButtonBorder
onClick = onPost
) {
Text(text = stringResource(R.string.post), color = Color.White)
Text(text = stringResource(R.string.post))
}
}

View File

@ -103,8 +103,7 @@ fun NewRelayListView(onClose: () -> Unit, accountViewModel: AccountViewModel, re
title = {
Row(
modifier = Modifier
.fillMaxWidth()
.padding(end = 10.dp),
.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween,
verticalAlignment = Alignment.CenterVertically
) {
@ -122,7 +121,7 @@ fun NewRelayListView(onClose: () -> Unit, accountViewModel: AccountViewModel, re
Text(stringResource(R.string.default_relays))
}
PostButton(
SaveButton(
onPost = {
postViewModel.create()
onClose()

View File

@ -72,7 +72,7 @@ fun NewUserMetadataView(onClose: () -> Unit, account: Account) {
onClose()
})
PostButton(
SaveButton(
onPost = {
postViewModel.create()
onClose()