fix(rtc): dedupe recent-updates-flow

experiment/tanstack-table
rcmerci 2024-06-25 12:31:21 +08:00
parent 5149d0cc3e
commit 23238aa8fe
1 changed files with 4 additions and 3 deletions

View File

@ -47,10 +47,11 @@
[user-uuid
{:user-info (user-uuid->user user-uuid)
:updates
(take-while
(fn [[inst _]] (> inst mins-ago))
(sequence
(comp (take-while (fn [[inst _]] (> inst mins-ago)))
(dedupe))
(concat (get-in latest-updates [graph-uuid user-uuid])
(get-in @*buffer [graph-uuid user-uuid])))}]))
(get-in @*buffer [graph-uuid user-uuid :updates])))}]))
latest-keys)}]
(swap! *buffer merge new-map)
@*buffer))))