mirror of https://github.com/logseq/logseq
fix: linked references not refreshed
parent
175988244a
commit
2767b8359d
|
@ -65,11 +65,6 @@
|
|||
journal? (date/valid-journal-title? (string/capitalize page-name))
|
||||
repo (state/get-current-repo)
|
||||
ref-blocks (cond
|
||||
priority?
|
||||
(db/get-blocks-by-priority repo page-name)
|
||||
|
||||
marker?
|
||||
(db/get-marker-blocks repo page-name)
|
||||
block-id
|
||||
(db/get-block-referenced-blocks block-id)
|
||||
:else
|
||||
|
|
|
@ -234,12 +234,14 @@
|
|||
[:page/mentioned-pages current-page-id]])
|
||||
|
||||
(apply concat
|
||||
(for [{:block/keys [refs]} blocks]
|
||||
(mapcat (fn [ref]
|
||||
(when-let [block (db-utils/entity ref)]
|
||||
[[:page/blocks (:db/id (:block/page block))]
|
||||
[:block/refed-blocks (:db/id block)]]))
|
||||
refs))))
|
||||
(for [{:block/keys [refs]} blocks]
|
||||
(mapcat (fn [ref]
|
||||
(when-let [block (if (and (map? ref) (:block/name ref))
|
||||
(db-utils/entity [:block/name (:block/name ref)])
|
||||
(db-utils/entity ref))]
|
||||
[[:page/blocks (:db/id (:block/page block))]
|
||||
[:block/refed-blocks (:db/id block)]]))
|
||||
refs))))
|
||||
(distinct))
|
||||
refed-pages (map
|
||||
(fn [[k page-id]]
|
||||
|
|
Loading…
Reference in New Issue