From 39e5dd5142a47928781c77efc11b23bc1956a11f Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Fri, 19 May 2023 15:04:56 +0600 Subject: [PATCH] UBER-139 ezQMS: Inbox Alert indicator remains on (#3219) Signed-off-by: Denis Bykhov --- plugins/notification-resources/src/components/Inbox.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/notification-resources/src/components/Inbox.svelte b/plugins/notification-resources/src/components/Inbox.svelte index 064ba2ac08..9bb41fcefa 100644 --- a/plugins/notification-resources/src/components/Inbox.svelte +++ b/plugins/notification-resources/src/components/Inbox.svelte @@ -21,12 +21,14 @@ import { AnyComponent, Component, Label, ListView, Loading, Scroller } from '@hcengineering/ui' import view from '@hcengineering/view' import { ActionContext, ListSelectionProvider, SelectDirection } from '@hcengineering/view-resources' + import { NotificationClientImpl } from '../utils' import NotificationView from './NotificationView.svelte' export let visibileNav: boolean const client = getClient() const hierarchy = client.getHierarchy() + const notificationClient = NotificationClientImpl.getClient() const query = createQuery() let docs: DocUpdates[] = [] @@ -74,7 +76,10 @@ } } - function select (value: DocUpdates) { + async function select (value: DocUpdates) { + if (value.attachedTo !== _id && _id !== undefined) { + await notificationClient.read(_id) + } listProvider.updateFocus(value) const targetClass = hierarchy.getClass(value.attachedToClass) const panelComponent = hierarchy.as(targetClass, view.mixin.ObjectPanel)