Skip to content

Commit 8371a0a

Browse files
committed
Merge remote-tracking branch 'pr/1429'
2 parents 9e48f76 + c1a1982 commit 8371a0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+721
-115
lines changed

assets/icons/ZulipIcons.ttf

812 Bytes
Binary file not shown.

assets/icons/eye.svg

Lines changed: 3 additions & 0 deletions
Loading

assets/icons/eye_off.svg

Lines changed: 3 additions & 0 deletions
Loading

assets/icons/person.svg

Lines changed: 10 additions & 0 deletions
Loading
File renamed without changes.

assets/l10n/app_en.arb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,10 @@
132132
"@actionSheetOptionMarkAsUnread": {
133133
"description": "Label for mark as unread button on action sheet."
134134
},
135+
"actionSheetOptionHideMutedMessage": "Hide muted message again",
136+
"@actionSheetOptionHideMutedMessage": {
137+
"description": "Label for hide muted message again button on action sheet."
138+
},
135139
"actionSheetOptionShare": "Share",
136140
"@actionSheetOptionShare": {
137141
"description": "Label for share button on action sheet."
@@ -979,6 +983,18 @@
979983
"@noEarlierMessages": {
980984
"description": "Text to show at the start of a message list if there are no earlier messages."
981985
},
986+
"mutedSender": "Muted sender",
987+
"@mutedSender": {
988+
"description": "Name for a muted user to display in message list."
989+
},
990+
"revealButtonLabel": "Reveal message for muted sender",
991+
"@revealButtonLabel": {
992+
"description": "Label for the button revealing hidden message from a muted sender in message list."
993+
},
994+
"mutedUser": "Muted user",
995+
"@mutedUser": {
996+
"description": "Name for a muted user to display all over the app."
997+
},
982998
"scrollToBottomTooltip": "Scroll to bottom",
983999
"@scrollToBottomTooltip": {
9841000
"description": "Tooltip for button to scroll to bottom."

lib/api/model/events.dart

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ sealed class Event {
6262
}
6363
// case 'muted_topics': … // TODO(#422) we ignore this feature on older servers
6464
case 'user_topic': return UserTopicEvent.fromJson(json);
65+
case 'muted_users': return MutedUsersEvent.fromJson(json);
6566
case 'message': return MessageEvent.fromJson(json);
6667
case 'update_message': return UpdateMessageEvent.fromJson(json);
6768
case 'delete_message': return DeleteMessageEvent.fromJson(json);
@@ -733,6 +734,24 @@ class UserTopicEvent extends Event {
733734
Map<String, dynamic> toJson() => _$UserTopicEventToJson(this);
734735
}
735736

737+
/// A Zulip event of type `muted_users`: https://zulip.com/api/get-events#muted_users
738+
@JsonSerializable(fieldRename: FieldRename.snake)
739+
class MutedUsersEvent extends Event {
740+
@override
741+
@JsonKey(includeToJson: true)
742+
String get type => 'muted_users';
743+
744+
final List<MutedUserItem> mutedUsers;
745+
746+
MutedUsersEvent({required super.id, required this.mutedUsers});
747+
748+
factory MutedUsersEvent.fromJson(Map<String, dynamic> json) =>
749+
_$MutedUsersEventFromJson(json);
750+
751+
@override
752+
Map<String, dynamic> toJson() => _$MutedUsersEventToJson(this);
753+
}
754+
736755
/// A Zulip event of type `message`: https://zulip.com/api/get-events#message
737756
@JsonSerializable(fieldRename: FieldRename.snake)
738757
class MessageEvent extends Event {

lib/api/model/events.g.dart

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/api/model/initial_snapshot.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class InitialSnapshot {
4444

4545
// final List<…> mutedTopics; // TODO(#422) we ignore this feature on older servers
4646

47+
final List<MutedUserItem> mutedUsers;
48+
4749
final Map<String, RealmEmojiItem> realmEmoji;
4850

4951
final List<RecentDmConversation> recentPrivateConversations;
@@ -132,6 +134,7 @@ class InitialSnapshot {
132134
required this.serverTypingStartedExpiryPeriodMilliseconds,
133135
required this.serverTypingStoppedWaitPeriodMilliseconds,
134136
required this.serverTypingStartedWaitPeriodMilliseconds,
137+
required this.mutedUsers,
135138
required this.realmEmoji,
136139
required this.recentPrivateConversations,
137140
required this.savedSnippets,

lib/api/model/initial_snapshot.g.dart

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)