mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
refactor: db based filters
Uses properties :logseq.property.linked-references/included-pages and :logseq.property.linked-references/excluded-pages to store filters instead of a map. Fixes LOG-3074
This commit is contained in:
@@ -87,10 +87,8 @@
|
||||
[ref-blocks filters]
|
||||
(if (empty? filters)
|
||||
ref-blocks
|
||||
(let [exclude-ids (->> (keep (fn [page] (:db/id (db/get-page page))) (get filters false))
|
||||
(set))
|
||||
include-ids (->> (keep (fn [page] (:db/id (db/get-page page))) (get filters true))
|
||||
(set))]
|
||||
(let [exclude-ids (set (map :db/id (:excluded filters)))
|
||||
include-ids (set (map :db/id (:included filters)))]
|
||||
(cond->> ref-blocks
|
||||
(seq exclude-ids)
|
||||
(remove (fn [block]
|
||||
|
||||
Reference in New Issue
Block a user