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)
|
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)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue