Skip to content

Commit ba79788

Browse files
committed
action_sheet: Prefix channel name with "#" in a confirmation dialog title
See Alya's feedback on zulip#1890: zulip#1890 (comment) > In general, our pattern is to always show a privacy marker or (if > not convenient) a `#` before a channel name. It can be a separate > PR, but can we add that to these confirmation dialogs? Doing this in code, rather than in the translators' source string, because we don't want it to vary by language.
1 parent de03f4b commit ba79788

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/widgets/action_sheet.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ class UnsubscribeButton extends ActionSheetMenuItemButton {
645645
final zulipLocalizations = ZulipLocalizations.of(pageContext);
646646

647647
final dialog = showSuggestedActionDialog(context: pageContext,
648-
title: zulipLocalizations.unsubscribeConfirmationDialogTitle(subscription.name),
648+
title: zulipLocalizations.unsubscribeConfirmationDialogTitle('#${subscription.name}'),
649649
message: zulipLocalizations.unsubscribeConfirmationDialogMessageMaybeCannotResubscribe,
650650
destructiveActionButton: true,
651651
actionButtonText: zulipLocalizations.unsubscribeConfirmationDialogConfirmButton);

test/widgets/action_sheet_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ void main() {
583583
await tester.pump();
584584

585585
final (unsubscribeButton, cancelButton) = checkSuggestedActionDialog(tester,
586-
expectedTitle: 'Unsubscribe from ${channel.name}?',
586+
expectedTitle: 'Unsubscribe from #${channel.name}?',
587587
expectedMessage: 'Once you leave this channel, you might not be able to rejoin.',
588588
expectDestructiveActionButton: true,
589589
expectedActionButtonText: 'Unsubscribe');

0 commit comments

Comments
 (0)