@@ -159,7 +159,7 @@ class NotificationDisplayManager {
159
159
number: messagingStyle.messages.length,
160
160
extras: {
161
161
// Used to decide when a `RemoveFcmMessage` event should clear this notification.
162
- kExtraZulipMessageId : data.zulipMessageId.toString (),
162
+ kExtraLastZulipMessageId : data.zulipMessageId.toString (),
163
163
},
164
164
165
165
contentIntent: PendingIntent (
@@ -227,7 +227,7 @@ class NotificationDisplayManager {
227
227
// https://github.com/zulip/zulip-mobile/pull/4842#pullrequestreview-725817909
228
228
var haveRemaining = false ;
229
229
final activeNotifications = await _androidHost.getActiveNotifications (
230
- desiredExtras: [kExtraZulipMessageId ]);
230
+ desiredExtras: [kExtraLastZulipMessageId ]);
231
231
for (final statusBarNotification in activeNotifications) {
232
232
if (statusBarNotification == null ) continue ; // TODO(pigeon) eliminate this case
233
233
@@ -248,7 +248,7 @@ class NotificationDisplayManager {
248
248
// Don't act on the summary notification for the group.
249
249
if (statusBarNotification.tag == groupKey) continue ;
250
250
251
- final lastMessageIdStr = notification.extras[kExtraZulipMessageId ];
251
+ final lastMessageIdStr = notification.extras[kExtraLastZulipMessageId ];
252
252
assert (lastMessageIdStr != null );
253
253
if (lastMessageIdStr == null ) continue ; // TODO(log)
254
254
final lastMessageId = int .parse (lastMessageIdStr, radix: 10 );
@@ -277,13 +277,13 @@ class NotificationDisplayManager {
277
277
}
278
278
}
279
279
280
- /// The key for the message-id entry in [Notification.extras] metadata.
280
+ /// A key we use in [Notification.extras] for the [Message.id] of the
281
+ /// latest Zulip message in the notification's conversation.
281
282
///
282
- /// Currently, it is used to store the message-id in the respective
283
- /// notification which is later fetched to determine if a [RemoveFcmMessage]
284
- /// event should clear that specific notification.
283
+ /// We use this to determine if a [RemoveFcmMessage] event should
284
+ /// clear that specific notification.
285
285
@visibleForTesting
286
- static const kExtraZulipMessageId = 'zulipMessageId ' ;
286
+ static const kExtraLastZulipMessageId = 'lastZulipMessageId ' ;
287
287
288
288
/// A notification ID, derived as a hash of the given string key.
289
289
///
0 commit comments