fix: reactive references

This commit is contained in:
Tienson Qin
2022-08-19 20:28:50 +08:00
committed by Andelf
parent 3d5825330e
commit f4715db2b2
2 changed files with 18 additions and 13 deletions

View File

@@ -251,7 +251,7 @@
(defn get-blocks-refed-pages
[aliases ref-blocks]
(let [refs (->> (mapcat (fn [b] (conj (:block/refs b) (:block/page b))) ref-blocks)
(let [refs (->> (mapcat (fn [b] (conj (:block/path-refs b) (:block/page b))) ref-blocks)
distinct
(remove #(aliases (:db/id %))))]
(keep (fn [ref]
@@ -275,6 +275,6 @@
(seq (set/intersection exclude-ids ids)))))
(seq include-ids)
(remove (fn [block]
(filter (fn [block]
(let [ids (set (map :db/id (:block/path-refs block)))]
(empty? (set/intersection include-ids ids)))))))))
(set/subset? include-ids ids))))))))