Skip to content

Commit e2421b8

Browse files
notif: Prefix stream names with #
Fixes: #572
1 parent bf8afe1 commit e2421b8

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

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

0 commit comments

Comments
 (0)