mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: remove built-in properties only used by file graphs
In #11508 we switched to a new table component for db graph queries which left these built-in properties unused. Also moved file query code to file-based namespaces and fixed a bug where multiple query properties couldn't be set for a file graph query
This commit is contained in:
@@ -893,31 +893,6 @@
|
||||
"")]
|
||||
(when edit-block-f (edit-block-f))))))))
|
||||
|
||||
(defn set-block-query-properties!
|
||||
[block-id all-properties key add?]
|
||||
(when-let [block (db/entity [:block/uuid block-id])]
|
||||
(let [query-properties (get block (pu/get-pid :logseq.property/query-properties))
|
||||
repo (state/get-current-repo)
|
||||
db-based? (config/db-based-graph? repo)
|
||||
query-properties (if db-based?
|
||||
query-properties
|
||||
(some-> query-properties
|
||||
(common-handler/safe-read-string "Parsing query properties failed")))
|
||||
query-properties (if (seq query-properties)
|
||||
query-properties
|
||||
all-properties)
|
||||
query-properties (if add?
|
||||
(distinct (conj query-properties key))
|
||||
(remove #{key} query-properties))
|
||||
query-properties (vec query-properties)]
|
||||
(if (seq query-properties)
|
||||
(property-handler/set-block-property! repo block-id
|
||||
(pu/get-pid :logseq.property/query-properties)
|
||||
(if db-based?
|
||||
query-properties
|
||||
(str query-properties)))
|
||||
(property-handler/remove-block-property! repo block-id (pu/get-pid :logseq.property/query-properties))))))
|
||||
|
||||
(defn set-block-timestamp!
|
||||
[block-id key value]
|
||||
(let [key (string/lower-case (str key))
|
||||
|
||||
Reference in New Issue
Block a user