Add 'edit' state for call name button.

This commit is contained in:
Alex Hart
2023-09-08 13:01:20 -03:00
parent 052ec14a6b
commit a154a6cce5
3 changed files with 17 additions and 3 deletions

View File

@@ -106,7 +106,13 @@ class CreateCallLinkBottomSheetDialogFragment : ComposeBottomSheetDialogFragment
Spacer(modifier = Modifier.height(12.dp)) Spacer(modifier = Modifier.height(12.dp))
Rows.TextRow( Rows.TextRow(
text = stringResource(id = R.string.CreateCallLinkBottomSheetDialogFragment__add_call_name), text = stringResource(
id = if (callLink.state.name.isEmpty()) {
R.string.CreateCallLinkBottomSheetDialogFragment__add_call_name
} else {
R.string.CreateCallLinkBottomSheetDialogFragment__edit_call_name
}
),
onClick = this@CreateCallLinkBottomSheetDialogFragment::onAddACallNameClicked onClick = this@CreateCallLinkBottomSheetDialogFragment::onAddACallNameClicked
) )

View File

@@ -246,7 +246,13 @@ private fun CallLinkDetails(
if (state.callLink.credentials?.adminPassBytes != null) { if (state.callLink.credentials?.adminPassBytes != null) {
Rows.TextRow( Rows.TextRow(
text = stringResource(id = R.string.CallLinkDetailsFragment__add_call_name), text = stringResource(
id = if (state.callLink.state.name.isEmpty()) {
R.string.CreateCallLinkBottomSheetDialogFragment__add_call_name
} else {
R.string.CreateCallLinkBottomSheetDialogFragment__edit_call_name
}
),
onClick = callback::onEditNameClicked onClick = callback::onEditNameClicked
) )

View File

@@ -6080,8 +6080,10 @@
<string name="CreateCallLinkBottomSheetDialogFragment__signal_call">Signal call</string> <string name="CreateCallLinkBottomSheetDialogFragment__signal_call">Signal call</string>
<!-- Displayed on a small button to allow user to instantly join call --> <!-- Displayed on a small button to allow user to instantly join call -->
<string name="CreateCallLinkBottomSheetDialogFragment__join">Join</string> <string name="CreateCallLinkBottomSheetDialogFragment__join">Join</string>
<!-- Option to open a full screen dialog to enter a call name --> <!-- Option to open a full screen dialog to add a call name -->
<string name="CreateCallLinkBottomSheetDialogFragment__add_call_name">Add call name</string> <string name="CreateCallLinkBottomSheetDialogFragment__add_call_name">Add call name</string>
<!-- Option to open a full screen dialog to edit a call name -->
<string name="CreateCallLinkBottomSheetDialogFragment__edit_call_name">Edit call name</string>
<!-- Toggle to require approval for all members before joining --> <!-- Toggle to require approval for all members before joining -->
<string name="CreateCallLinkBottomSheetDialogFragment__approve_all_members">Approve all members</string> <string name="CreateCallLinkBottomSheetDialogFragment__approve_all_members">Approve all members</string>
<!-- Row label to share the link via Signal --> <!-- Row label to share the link via Signal -->