From 2d6810725fd63ab6168efab388e1ca4928bbf6be Mon Sep 17 00:00:00 2001 From: Aditya Chaudhary <30+useradityaa@noreply.coracle.social> Date: Tue, 21 Jul 2026 18:05:39 +0000 Subject: [PATCH] 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> --- src/app/notifications.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app/notifications.ts b/src/app/notifications.ts index aa311725..5c0e7231 100644 --- a/src/app/notifications.ts +++ b/src/app/notifications.ts @@ -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) + } } } }