From 0de67878a09ee664ff7511da03f119d8a1002144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Tue, 20 May 2025 15:58:09 +0200 Subject: [PATCH] Always close inbox when navigating to notification --- src/components/NotificationTeaser.svelte | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/NotificationTeaser.svelte b/src/components/NotificationTeaser.svelte index 1e425e546..bb1d1f7dd 100644 --- a/src/components/NotificationTeaser.svelte +++ b/src/components/NotificationTeaser.svelte @@ -6,6 +6,7 @@ import type { RepoRoute } from "@app/views/repo/router"; import type { NotificationItem } from "@bindings/cob/inbox/NotificationItem"; + import uniqWith from "lodash/uniqWith"; import { authorForNodeId, formatTimestamp, @@ -14,9 +15,9 @@ patchStatusBackgroundColor, patchStatusColor, } from "@app/lib/utils"; + import { closeFocused } from "./Popover.svelte"; import { compressActions } from "@app/lib/notification"; import { push } from "@app/lib/router"; - import uniqWith from "lodash/uniqWith"; import Icon from "./Icon.svelte"; import InlineTitle from "./InlineTitle.svelte"; @@ -177,7 +178,10 @@ class:selected class="notification-teaser" onclick={() => { - if (route) void push(route); + if (route) { + void push(route); + closeFocused(); + } }}>