TSK-1341 Remove last view (#3115)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov
2023-04-29 22:46:13 +07:00
committed by GitHub
parent 9b04d366e3
commit ae8fcf8d62
41 changed files with 204 additions and 645 deletions
@@ -46,7 +46,7 @@
{ attachedTo: channelId },
(res) => {
messages = res
notificationClient.updateLastView(channelId, channel._class, undefined, true)
notificationClient.read(channelId)
},
{ sort: { sendOn: SortingOrder.Descending } }
)
@@ -68,7 +68,7 @@
messages: convertMessages(object, channel, selectedMessages, $employeeAccountByIdStore, $employeeByIdStore)
}
)
await notificationClient.updateLastView(channel._id, channel._class, undefined, true)
await notificationClient.read(channel._id)
clear()
}
@@ -78,7 +78,7 @@
async function selectHandler (e: CustomEvent): Promise<void> {
currentMessage = e.detail
if (channel !== undefined) {
await notificationClient.updateLastView(channel._id, channel._class, undefined, true)
await notificationClient.read(channel._id)
}
}
@@ -73,7 +73,7 @@
},
objectId
)
await notificationClient.updateLastView(channel._id, channel._class, undefined, true)
await notificationClient.read(channel._id)
objectId = generateId()
dispatch('close')
}
@@ -92,7 +92,7 @@
.map((m) => m.trim())
.filter((m) => m.length)
})
await notificationClient.updateLastView(channel._id, channel._class, undefined, true)
await notificationClient.read(channel._id)
for (const attachment of attachments) {
await client.addCollection(
attachmentP.class.Attachment,