UBERF-4360: rewrite chat (#4265)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-01-11 21:46:11 +07:00
committed by GitHub
parent 06f6f6a222
commit 7f6f5e28a6
183 changed files with 6360 additions and 5051 deletions
@@ -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 &&