mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
move comment back to right place, and explain we we do it after
This commit is contained in:
parent
889ca05506
commit
b3680af342
@ -261,13 +261,16 @@ async function handlePushNotification(n) {
|
||||
}
|
||||
body = n.content?.body || "New message";
|
||||
}
|
||||
// close any previous notifications for this room
|
||||
await self.registration.showNotification(label, {
|
||||
body,
|
||||
data: {sessionId, roomId, multi},
|
||||
tag: NOTIF_TAG_NEW_MESSAGE,
|
||||
badge: NOTIFICATION_BADGE_ICON
|
||||
});
|
||||
// close any previous notifications for this room
|
||||
// AFTER showing the new notification as on Android
|
||||
// where we can only show 1 notification, this creates
|
||||
// a smoother transition
|
||||
if (notifsToClose) {
|
||||
for (const notif of notifsToClose) {
|
||||
console.log("close previous notification");
|
||||
|
Loading…
Reference in New Issue
Block a user