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:
parent
1eebe1698a
commit
2d6810725f
1 changed files with 10 additions and 3 deletions
|
|
@ -237,17 +237,24 @@ export const allNotifications = derived(
|
|||
const roomPath = makeRoomPath(url, h)
|
||||
|
||||
if (hasNotification(roomPath, latestEvent)) {
|
||||
paths.add(spacePath)
|
||||
paths.add(roomPath)
|
||||
|
||||
if (hasNotification(spacePath, latestEvent)) {
|
||||
paths.add(spacePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const messagesPath = makeSpaceChatPath(url)
|
||||
const latestEvent = first(events)
|
||||
|
||||
if (hasNotification(messagesPath, first(events))) {
|
||||
paths.add(spacePath)
|
||||
if (hasNotification(messagesPath, latestEvent)) {
|
||||
paths.add(messagesPath)
|
||||
|
||||
if (hasNotification(spacePath, latestEvent)) {
|
||||
paths.add(spacePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue