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
@@ -60,7 +60,6 @@
export let embedded = false
let lastId: Ref<Doc> = _id
let lastClass: Ref<Class<Doc>> = _class
const query = createQuery()
@@ -79,17 +78,15 @@
function read (_id: Ref<Doc>) {
if (lastId !== _id) {
const prev = lastId
const prevClass = lastClass
lastId = _id
lastClass = _class
notificationClient.then((client) => client.updateLastView(prev, prevClass))
notificationClient.then((client) => client.read(prev))
}
}
const currentUser = getCurrentAccount() as EmployeeAccount
onDestroy(async () => {
notificationClient.then((client) => client.updateLastView(_id, _class))
notificationClient.then((client) => client.read(_id))
})
let requests: DocumentRequest[] = []