mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-20 08:37:53 +02:00
UBERF-4360: rewrite chat (#4265)
Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
@@ -70,19 +70,19 @@
|
||||
let descriptionBox: AttachmentStyleBoxCollabEditor
|
||||
let showAllMixins: boolean
|
||||
|
||||
const notificationClient = getResource(notification.function.GetNotificationClient).then((res) => res())
|
||||
const inboxClient = getResource(notification.function.GetInboxNotificationsClient).then((res) => res())
|
||||
|
||||
$: read(_id)
|
||||
function read (_id: Ref<Doc>): void {
|
||||
if (lastId !== _id) {
|
||||
const prev = lastId
|
||||
lastId = _id
|
||||
void notificationClient.then((client) => client.read(prev))
|
||||
void inboxClient.then((client) => client.readDoc(prev))
|
||||
}
|
||||
}
|
||||
|
||||
onDestroy(async () => {
|
||||
void notificationClient.then((client) => client.read(_id))
|
||||
void inboxClient.then((client) => client.readDoc(_id))
|
||||
})
|
||||
|
||||
$: _id !== undefined &&
|
||||
|
||||
@@ -47,19 +47,19 @@
|
||||
|
||||
let descriptionBox: AttachmentStyleBoxCollabEditor
|
||||
|
||||
const notificationClient = getResource(notification.function.GetNotificationClient).then((res) => res())
|
||||
const inboxClient = getResource(notification.function.GetInboxNotificationsClient).then((res) => res())
|
||||
|
||||
$: read(_id)
|
||||
function read (_id: Ref<Doc>): void {
|
||||
if (lastId !== _id) {
|
||||
const prev = lastId
|
||||
lastId = _id
|
||||
void notificationClient.then((client) => client.read(prev))
|
||||
void inboxClient.then((client) => client.readDoc(prev))
|
||||
}
|
||||
}
|
||||
|
||||
onDestroy(async () => {
|
||||
void notificationClient.then((client) => client.read(_id))
|
||||
void inboxClient.then((client) => client.readDoc(_id))
|
||||
})
|
||||
|
||||
$: _id !== undefined &&
|
||||
|
||||
Reference in New Issue
Block a user