mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
fix: block ref numbers not updated unless re-indexed
Close #1673 Also, fixed an issue that update the block in references doesn't work
This commit is contained in:
@@ -235,9 +235,10 @@
|
||||
|
||||
(apply concat
|
||||
(for [{:block/keys [refs]} blocks]
|
||||
(map (fn [page]
|
||||
(when-let [page (db-utils/entity [:block/name (:block/name page)])]
|
||||
[:block/refed-blocks (:db/id page)]))
|
||||
(mapcat (fn [ref]
|
||||
(when-let [block (db-utils/entity ref)]
|
||||
[[:page/blocks (:db/id (:block/page block))]
|
||||
[:block/refed-blocks (:db/id block)]]))
|
||||
refs))))
|
||||
(distinct))
|
||||
refed-pages (map
|
||||
|
||||
Reference in New Issue
Block a user