diff --git a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt index 23eb61e87e..48078af1e5 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationActivity.kt @@ -468,7 +468,7 @@ fun RoomCreationOptions(conversationCreationViewModel: ConversationCreationViewM if (isGuestsAllowed && !isPasswordSet) { ConversationOptions( - icon = R.drawable.ic_lock_grey600_24px, + icon = R.drawable.baseline_lock_open_24, text = R.string.nc_set_password, conversationCreationViewModel = conversationCreationViewModel ) @@ -656,6 +656,16 @@ fun ShowPasswordDialog(onDismiss: () -> Unit, conversationCreationViewModel: Con AlertDialog( containerColor = colorResource(id = R.color.dialog_background), onDismissRequest = onDismiss, + title = { Text(text = stringResource(id = R.string.nc_set_password)) }, + text = { + TextField( + value = password, + onValueChange = { + password = it + }, + label = { Text(text = stringResource(id = R.string.nc_guest_access_password_dialog_hint)) } + ) + }, confirmButton = { Button( onClick = { @@ -668,16 +678,6 @@ fun ShowPasswordDialog(onDismiss: () -> Unit, conversationCreationViewModel: Con Text(text = stringResource(id = R.string.save)) } }, - title = { Text(text = stringResource(id = R.string.nc_set_password)) }, - text = { - TextField( - value = password, - onValueChange = { - password = it - }, - label = { Text(text = stringResource(id = R.string.nc_guest_access_password_dialog_hint)) } - ) - }, dismissButton = { Button(onClick = { onDismiss() }) { Text(text = stringResource(id = R.string.nc_cancel)) diff --git a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt index 509bf4be31..eb836178f1 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationcreation/ConversationCreationViewModel.kt @@ -46,7 +46,7 @@ class ConversationCreationViewModel @Inject constructor( } fun isPasswordEnabled(value: Boolean) { - isPasswordEnabled.value = value + _isPasswordEnabled.value = value fun updateSelectedImageUri(uri: Uri?) { _selectedImageUri.value = uri } diff --git a/app/src/main/res/drawable/baseline_lock_open_24.xml b/app/src/main/res/drawable/baseline_lock_open_24.xml new file mode 100644 index 0000000000..ed16256a53 --- /dev/null +++ b/app/src/main/res/drawable/baseline_lock_open_24.xml @@ -0,0 +1,18 @@ + + + + + + +