fix: clear space badge when navigating to a space (#327)

Reviewed-on: https://gitea.coracle.social/coracle/flotilla/pulls/327
Co-authored-by: Aditya Chaudhary <30+useradityaa@noreply.coracle.social>
Co-committed-by: Aditya Chaudhary <30+useradityaa@noreply.coracle.social>
This commit is contained in:
Aditya Chaudhary 2026-07-21 18:05:39 +00:00 committed by hodlbod
parent 1eebe1698a
commit 2d6810725f

View file

@ -237,17 +237,24 @@ export const allNotifications = derived(
const roomPath = makeRoomPath(url, h) const roomPath = makeRoomPath(url, h)
if (hasNotification(roomPath, latestEvent)) { if (hasNotification(roomPath, latestEvent)) {
paths.add(spacePath)
paths.add(roomPath) paths.add(roomPath)
if (hasNotification(spacePath, latestEvent)) {
paths.add(spacePath)
}
} }
} }
} }
} else { } else {
const messagesPath = makeSpaceChatPath(url) const messagesPath = makeSpaceChatPath(url)
const latestEvent = first(events)
if (hasNotification(messagesPath, first(events))) { if (hasNotification(messagesPath, latestEvent)) {
paths.add(spacePath)
paths.add(messagesPath) paths.add(messagesPath)
if (hasNotification(spacePath, latestEvent)) {
paths.add(spacePath)
}
} }
} }
} }