Skip to content

Commit 410250c

Browse files
chrisbobbegnprice
authored andcommitted
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 aaff63f commit 410250c

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
@@ -647,7 +647,7 @@ class UnsubscribeButton extends ActionSheetMenuItemButton {
647647
final zulipLocalizations = ZulipLocalizations.of(pageContext);
648648

649649
final dialog = showSuggestedActionDialog(context: pageContext,
650-
title: zulipLocalizations.unsubscribeConfirmationDialogTitle(subscription.name),
650+
title: zulipLocalizations.unsubscribeConfirmationDialogTitle('#${subscription.name}'),
651651
message: zulipLocalizations.unsubscribeConfirmationDialogMessageCannotResubscribe,
652652
destructiveActionButton: true,
653653
actionButtonText: zulipLocalizations.unsubscribeConfirmationDialogConfirmButton);

test/widgets/action_sheet_test.dart

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

601601
final (unsubscribeButton, cancelButton) = checkSuggestedActionDialog(tester,
602-
expectedTitle: 'Unsubscribe from ${channel.name}?',
602+
expectedTitle: 'Unsubscribe from #${channel.name}?',
603603
expectedMessage: 'Once you leave this channel, you will not be able to rejoin.',
604604
expectDestructiveActionButton: true,
605605
expectedActionButtonText: 'Unsubscribe');

0 commit comments

Comments
 (0)