Skip to content

Commit e3a388d

Browse files
committed
msglist/emoji: Distinguish muted users in message list page and reactions
1 parent c01b196 commit e3a388d

13 files changed

+47
-3
lines changed

assets/l10n/app_en.arb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,10 @@
947947
"@revealButtonLabel": {
948948
"description": "Label for the button revealing hidden message from a muted sender in message list."
949949
},
950+
"mutedUser": "Muted user",
951+
"@mutedUser": {
952+
"description": "Name for a muted user to display all over the app."
953+
},
950954
"scrollToBottomTooltip": "Scroll to bottom",
951955
"@scrollToBottomTooltip": {
952956
"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
@@ -1397,6 +1397,12 @@ abstract class ZulipLocalizations {
13971397
/// **'Reveal message for muted sender'**
13981398
String get revealButtonLabel;
13991399

1400+
/// Name for a muted user to display all over the app.
1401+
///
1402+
/// In en, this message translates to:
1403+
/// **'Muted user'**
1404+
String get mutedUser;
1405+
14001406
/// Tooltip for button to scroll to bottom.
14011407
///
14021408
/// 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
@@ -768,6 +768,9 @@ class ZulipLocalizationsAr extends ZulipLocalizations {
768768
@override
769769
String get revealButtonLabel => 'Reveal message for muted sender';
770770

771+
@override
772+
String get mutedUser => 'Muted user';
773+
771774
@override
772775
String get scrollToBottomTooltip => 'Scroll to bottom';
773776

lib/generated/l10n/zulip_localizations_de.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,9 @@ class ZulipLocalizationsDe extends ZulipLocalizations {
768768
@override
769769
String get revealButtonLabel => 'Reveal message for muted sender';
770770

771+
@override
772+
String get mutedUser => 'Muted user';
773+
771774
@override
772775
String get scrollToBottomTooltip => 'Scroll to bottom';
773776

lib/generated/l10n/zulip_localizations_en.dart

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

771+
@override
772+
String get mutedUser => 'Muted user';
773+
771774
@override
772775
String get scrollToBottomTooltip => 'Scroll to bottom';
773776

lib/generated/l10n/zulip_localizations_ja.dart

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

771+
@override
772+
String get mutedUser => 'Muted user';
773+
771774
@override
772775
String get scrollToBottomTooltip => 'Scroll to bottom';
773776

lib/generated/l10n/zulip_localizations_nb.dart

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

771+
@override
772+
String get mutedUser => 'Muted user';
773+
771774
@override
772775
String get scrollToBottomTooltip => 'Scroll to bottom';
773776

lib/generated/l10n/zulip_localizations_pl.dart

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

782+
@override
783+
String get mutedUser => 'Muted user';
784+
782785
@override
783786
String get scrollToBottomTooltip => 'Przewiń do dołu';
784787

lib/generated/l10n/zulip_localizations_ru.dart

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

785+
@override
786+
String get mutedUser => 'Muted user';
787+
785788
@override
786789
String get scrollToBottomTooltip => 'Пролистать вниз';
787790

lib/generated/l10n/zulip_localizations_sk.dart

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

773+
@override
774+
String get mutedUser => 'Muted user';
775+
773776
@override
774777
String get scrollToBottomTooltip => 'Scroll to bottom';
775778

lib/generated/l10n/zulip_localizations_uk.dart

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

785+
@override
786+
String get mutedUser => 'Muted user';
787+
785788
@override
786789
String get scrollToBottomTooltip => 'Прокрутити вниз';
787790

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
@@ -409,7 +409,10 @@ class MessageListAppBarTitle extends StatelessWidget {
409409
if (otherRecipientIds.isEmpty) {
410410
return Text(zulipLocalizations.dmsWithYourselfPageTitle);
411411
} else {
412-
final names = otherRecipientIds.map(store.userDisplayName);
412+
final names = otherRecipientIds.map((id) =>
413+
store.isUserMuted(id)
414+
? zulipLocalizations.mutedUser
415+
: store.userDisplayName(id));
413416
// TODO show avatars
414417
return Text(
415418
zulipLocalizations.dmsWithOthersPageTitle(names.join(', ')));
@@ -1233,7 +1236,9 @@ class DmRecipientHeader extends StatelessWidget {
12331236
title = zulipLocalizations.messageListGroupYouAndOthers(
12341237
message.conversation.allRecipientIds
12351238
.where((id) => id != store.selfUserId)
1236-
.map(store.userDisplayName)
1239+
.map((id) => store.isUserMuted(id)
1240+
? zulipLocalizations.mutedUser
1241+
: store.userDisplayName(id))
12371242
.sorted()
12381243
.join(", "));
12391244
} else {

0 commit comments

Comments
 (0)