Skip to content

Commit 34fc3a8

Browse files
notif: Prefix stream names with #
Fixes: #572
1 parent 2728e01 commit 34fc3a8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/notifications/display.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ class NotificationDisplayManager {
9494
final zulipLocalizations = GlobalLocalizations.zulipLocalizations;
9595
final title = switch (data.recipient) {
9696
FcmMessageStreamRecipient(:var streamName?, :var topic) =>
97-
'$streamName > $topic',
97+
'#$streamName > $topic',
9898
FcmMessageStreamRecipient(:var topic) =>
99-
'(unknown channel) > $topic', // TODO get stream name from data
99+
'#(unknown channel) > $topic', // TODO get stream name from data
100100
FcmMessageDmRecipient(:var allRecipientIds) when allRecipientIds.length > 2 =>
101101
zulipLocalizations.notifGroupDmConversationLabel(
102102
data.senderFullName, allRecipientIds.length - 2), // TODO use others' names, from data

test/notifications/display_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void main() {
180180
final stream = eg.stream();
181181
final message = eg.streamMessage(stream: stream);
182182
await checkNotifications(async, messageFcmMessage(message, streamName: stream.name),
183-
expectedTitle: '${stream.name} > ${message.subject}',
183+
expectedTitle: '#${stream.name} > ${message.subject}',
184184
expectedTagComponent: 'stream:${message.streamId}:${message.subject}');
185185
}));
186186

@@ -189,7 +189,7 @@ void main() {
189189
final stream = eg.stream();
190190
final message = eg.streamMessage(stream: stream);
191191
await checkNotifications(async, messageFcmMessage(message, streamName: null),
192-
expectedTitle: '(unknown channel) > ${message.subject}',
192+
expectedTitle: '#(unknown channel) > ${message.subject}',
193193
expectedTagComponent: 'stream:${message.streamId}:${message.subject}');
194194
}));
195195

0 commit comments

Comments
 (0)