mirror of
https://github.com/logseq/logseq.git
synced 2026-05-30 07:29:48 +00:00
fix: remove dedupe-by since it doesn't allow consecutive writes
This commit is contained in:
@@ -31,10 +31,7 @@
|
||||
:today nil
|
||||
:system/events (async/chan 1000)
|
||||
:db/batch-txs (async/chan 1000)
|
||||
:file/writes (async/chan 10000
|
||||
(util/dedupe-by
|
||||
(fn [[repo page-id outliner-op _epoch]]
|
||||
[repo page-id outliner-op])))
|
||||
:file/writes (async/chan 10000)
|
||||
:file/unlinked-dirs #{}
|
||||
:reactive/custom-queries (async/chan 1000)
|
||||
:notification/show? false
|
||||
|
||||
@@ -1513,19 +1513,3 @@ Arg *stop: atom, reset to true to stop the loop"
|
||||
(if (satisfies? IMeta o)
|
||||
(with-meta o meta)
|
||||
o)))
|
||||
|
||||
|
||||
(defn dedupe-by
|
||||
([keyfn]
|
||||
(fn [rf]
|
||||
(let [pa (volatile! ::none)]
|
||||
(fn
|
||||
([] (rf))
|
||||
([result] (rf result))
|
||||
([result input]
|
||||
(let [prior @pa
|
||||
key (keyfn input)]
|
||||
(vreset! pa key)
|
||||
(if (= prior key)
|
||||
result
|
||||
(rf result input)))))))))
|
||||
|
||||
Reference in New Issue
Block a user