UBER-139 ezQMS: Inbox Alert indicator remains on (#3219)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-05-19 15:04:56 +06:00 committed by GitHub
parent 56df3c5ea2
commit 39e5dd5142
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)