Skip to content

Commit 02eef70

Browse files
committed
msglist/emoji: Distinguish muted users in message list page and reactions
1 parent 9530e32 commit 02eef70

12 files changed

+44
-3
lines changed

assets/l10n/app_en.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,10 @@
884884
"@revealButtonLabel": {
885885
"description": "Label for the button revealing hidden message from a muted sender in message list."
886886
},
887+
"mutedUser": "Muted user",
888+
"@mutedUser": {
889+
"description": "Name for a muted user to display all over the app."
890+
},
887891
"scrollToBottomTooltip": "Scroll to bottom",
888892
"@scrollToBottomTooltip": {
889893
"description": "Tooltip for button to scroll to bottom."

lib/generated/l10n/zulip_localizations.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1304,6 +1304,12 @@ abstract class ZulipLocalizations {
13041304
/// **'Reveal message for muted sender'**
13051305
String get revealButtonLabel;
13061306

1307+
/// Name for a muted user to display all over the app.
1308+
///
1309+
/// In en, this message translates to:
1310+
/// **'Muted user'**
1311+
String get mutedUser;
1312+
13071313
/// Tooltip for button to scroll to bottom.
13081314
///
13091315
/// In en, this message translates to:

lib/generated/l10n/zulip_localizations_ar.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
718718
@override
719719
String get revealButtonLabel => 'Reveal message for muted sender';
720720

721+
@override
722+
String get mutedUser => 'Muted user';
723+
721724
@override
722725
String get scrollToBottomTooltip => 'Scroll to bottom';
723726

lib/generated/l10n/zulip_localizations_en.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ class ZulipLocalizationsEn extends ZulipLocalizations {
718718
@override
719719
String get revealButtonLabel => 'Reveal message for muted sender';
720720

721+
@override
722+
String get mutedUser => 'Muted user';
723+
721724
@override
722725
String get scrollToBottomTooltip => 'Scroll to bottom';
723726

lib/generated/l10n/zulip_localizations_ja.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ class ZulipLocalizationsJa extends ZulipLocalizations {
718718
@override
719719
String get revealButtonLabel => 'Reveal message for muted sender';
720720

721+
@override
722+
String get mutedUser => 'Muted user';
723+
721724
@override
722725
String get scrollToBottomTooltip => 'Scroll to bottom';
723726

lib/generated/l10n/zulip_localizations_nb.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,9 @@ class ZulipLocalizationsNb extends ZulipLocalizations {
718718
@override
719719
String get revealButtonLabel => 'Reveal message for muted sender';
720720

721+
@override
722+
String get mutedUser => 'Muted user';
723+
721724
@override
722725
String get scrollToBottomTooltip => 'Scroll to bottom';
723726

lib/generated/l10n/zulip_localizations_pl.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,9 @@ class ZulipLocalizationsPl extends ZulipLocalizations {
729729
@override
730730
String get revealButtonLabel => 'Reveal message for muted sender';
731731

732+
@override
733+
String get mutedUser => 'Muted user';
734+
732735
@override
733736
String get scrollToBottomTooltip => 'Przewiń do dołu';
734737

lib/generated/l10n/zulip_localizations_ru.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,9 @@ class ZulipLocalizationsRu extends ZulipLocalizations {
732732
@override
733733
String get revealButtonLabel => 'Reveal message for muted sender';
734734

735+
@override
736+
String get mutedUser => 'Muted user';
737+
735738
@override
736739
String get scrollToBottomTooltip => 'Пролистать вниз';
737740

lib/generated/l10n/zulip_localizations_sk.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,9 @@ class ZulipLocalizationsSk extends ZulipLocalizations {
720720
@override
721721
String get revealButtonLabel => 'Reveal message for muted sender';
722722

723+
@override
724+
String get mutedUser => 'Muted user';
725+
723726
@override
724727
String get scrollToBottomTooltip => 'Scroll to bottom';
725728

lib/generated/l10n/zulip_localizations_uk.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,9 @@ class ZulipLocalizationsUk extends ZulipLocalizations {
732732
@override
733733
String get revealButtonLabel => 'Reveal message for muted sender';
734734

735+
@override
736+
String get mutedUser => 'Muted user';
737+
735738
@override
736739
String get scrollToBottomTooltip => 'Прокрутити вниз';
737740

lib/widgets/emoji_reaction.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ class ReactionChip extends StatelessWidget {
162162
? userIds.map((id) {
163163
return id == store.selfUserId
164164
? zulipLocalizations.reactedEmojiSelfUser
165-
: store.userDisplayName(id);
165+
: store.isUserMuted(id)
166+
? zulipLocalizations.mutedUser
167+
: store.userDisplayName(id);
166168
}).join(', ')
167169
: userIds.length.toString();
168170

lib/widgets/message_list.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,10 @@ class MessageListAppBarTitle extends StatelessWidget {
423423
if (otherRecipientIds.isEmpty) {
424424
return Text(zulipLocalizations.dmsWithYourselfPageTitle);
425425
} else {
426-
final names = otherRecipientIds.map(store.userDisplayName);
426+
final names = otherRecipientIds.map((id) =>
427+
store.isUserMuted(id)
428+
? zulipLocalizations.mutedUser
429+
: store.userDisplayName(id));
427430
// TODO show avatars
428431
return Text(
429432
zulipLocalizations.dmsWithOthersPageTitle(names.join(', ')));
@@ -1221,7 +1224,9 @@ class DmRecipientHeader extends StatelessWidget {
12211224
title = zulipLocalizations.messageListGroupYouAndOthers(
12221225
message.conversation.allRecipientIds
12231226
.where((id) => id != store.selfUserId)
1224-
.map(store.userDisplayName)
1227+
.map((id) => store.isUserMuted(id)
1228+
? zulipLocalizations.mutedUser
1229+
: store.userDisplayName(id))
12251230
.sorted()
12261231
.join(", "));
12271232
} else {

0 commit comments

Comments
 (0)