UBER-388 The orange dot doesn't go away (#3367)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-06-06 22:16:25 +06:00 committed by GitHub
parent 488ffeeed7
commit 537c872049
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,6 @@
import { AnyComponent, Component, Tabs } from '@hcengineering/ui' import { AnyComponent, Component, Tabs } from '@hcengineering/ui'
import view from '@hcengineering/view' import view from '@hcengineering/view'
import notification from '../plugin' import notification from '../plugin'
import { NotificationClientImpl } from '../utils'
import Activity from './Activity.svelte' import Activity from './Activity.svelte'
import EmployeeInbox from './EmployeeInbox.svelte' import EmployeeInbox from './EmployeeInbox.svelte'
import Filter from './Filter.svelte' import Filter from './Filter.svelte'
@ -32,7 +31,6 @@
const client = getClient() const client = getClient()
const hierarchy = client.getHierarchy() const hierarchy = client.getHierarchy()
const notificationClient = NotificationClientImpl.getClient()
$: tabs = [ $: tabs = [
{ {
@ -59,14 +57,17 @@
_class = undefined _class = undefined
return return
} }
if (value.attachedTo !== _id && _id !== undefined) {
await notificationClient.read(_id)
}
const targetClass = hierarchy.getClass(value.attachedToClass) const targetClass = hierarchy.getClass(value.attachedToClass)
const panelComponent = hierarchy.as(targetClass, view.mixin.ObjectPanel) const panelComponent = hierarchy.as(targetClass, view.mixin.ObjectPanel)
component = panelComponent.component ?? view.component.EditDoc component = panelComponent.component ?? view.component.EditDoc
_id = value.attachedTo _id = value.attachedTo
_class = value.attachedToClass _class = value.attachedToClass
await read(value)
}
async function read (docUpdate: DocUpdates): Promise<void> {
docUpdate.txes.forEach((p) => (p.isNew = false))
await client.update(docUpdate, { txes: docUpdate.txes })
} }
function openDM (value: Ref<Doc>) { function openDM (value: Ref<Doc>) {