Skip to content

Commit 0081b5c

Browse files
notif: Prefix stream names with #
Fixes: #572
1 parent 5627f10 commit 0081b5c

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
@@ -181,7 +181,7 @@ void main() {
181181
final stream = eg.stream();
182182
final message = eg.streamMessage(stream: stream);
183183
await checkNotifications(async, messageFcmMessage(message, streamName: stream.name),
184-
expectedTitle: '${stream.name} > ${message.subject}',
184+
expectedTitle: '#${stream.name} > ${message.subject}',
185185
expectedTagComponent: 'stream:${message.streamId}:${message.subject}');
186186
}));
187187

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

0 commit comments

Comments
 (0)