mirror of https://github.com/logseq/logseq
fix: when searching for text which is in a collapsed block, it is not opened
close #4017pull/4027/head^2
parent
c370a961aa
commit
d1cc77ae0c
|
@ -596,7 +596,7 @@
|
|||
(defn get-block-parents-v2
|
||||
[repo block-id]
|
||||
(d/pull (conn/get-conn repo)
|
||||
'[:db/id :block/properties {:block/parent ...}]
|
||||
'[:db/id :block/collapsed? :block/properties {:block/parent ...}]
|
||||
[:block/uuid block-id]))
|
||||
|
||||
(defn parents-collapsed?
|
||||
|
|
|
@ -16,18 +16,6 @@
|
|||
[repo page-id]
|
||||
(>= (db/get-page-blocks-count repo page-id) initial-blocks-length))
|
||||
|
||||
(defn get-block-ids
|
||||
[block]
|
||||
(let [ids (atom [])
|
||||
_ (walk/prewalk
|
||||
(fn [form]
|
||||
(when (map? form)
|
||||
(when-let [id (:block/uuid form)]
|
||||
(swap! ids conj id)))
|
||||
form)
|
||||
block)]
|
||||
@ids))
|
||||
|
||||
(defn get-block-refs-with-children
|
||||
[block]
|
||||
(->>
|
||||
|
|
|
@ -3492,7 +3492,7 @@
|
|||
:skip-transact? false}
|
||||
(doseq [block-id block-ids]
|
||||
(when-let [block (db/entity [:block/uuid block-id])]
|
||||
(let [current-value (boolean (util/collapsed? block))]
|
||||
(let [current-value (:block/collapsed? block)]
|
||||
(when-not (= current-value value)
|
||||
(let [block (outliner-core/block {:block/uuid block-id
|
||||
:block/collapsed? value})]
|
||||
|
|
Loading…
Reference in New Issue