mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 03:22:19 +03:00
UBER-509: do not update list of unread right after reading (#3461)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
d17918932b
commit
184f126b50
@ -32,6 +32,7 @@
|
||||
let docs: DocUpdates[] = []
|
||||
let filtered: DocUpdates[] = []
|
||||
let loading = true
|
||||
let previousFilter: 'all' | 'read' | 'unread' = filter
|
||||
|
||||
$: query.query(
|
||||
notification.class.DocUpdates,
|
||||
@ -55,10 +56,11 @@
|
||||
if (filter === 'read') {
|
||||
filtered = docs.filter((p) => !p.txes.some((p) => p.isNew) && p.txes.length > 0)
|
||||
} else if (filter === 'unread') {
|
||||
filtered = docs.filter((p) => p.txes.some((p) => p.isNew) && p.txes.length > 0)
|
||||
if (previousFilter !== 'unread') filtered = docs.filter((p) => p.txes.some((p) => p.isNew) && p.txes.length > 0)
|
||||
} else {
|
||||
filtered = docs.filter((p) => p.txes.length > 0)
|
||||
}
|
||||
previousFilter = filter
|
||||
listProvider.update(filtered)
|
||||
if (_id === undefined) {
|
||||
changeSelected(selected)
|
||||
|
Loading…
Reference in New Issue
Block a user