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
|
(defn get-block-parents-v2
|
||||||
[repo block-id]
|
[repo block-id]
|
||||||
(d/pull (conn/get-conn repo)
|
(d/pull (conn/get-conn repo)
|
||||||
'[:db/id :block/properties {:block/parent ...}]
|
'[:db/id :block/collapsed? :block/properties {:block/parent ...}]
|
||||||
[:block/uuid block-id]))
|
[:block/uuid block-id]))
|
||||||
|
|
||||||
(defn parents-collapsed?
|
(defn parents-collapsed?
|
||||||
|
|
|
@ -16,18 +16,6 @@
|
||||||
[repo page-id]
|
[repo page-id]
|
||||||
(>= (db/get-page-blocks-count repo page-id) initial-blocks-length))
|
(>= (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
|
(defn get-block-refs-with-children
|
||||||
[block]
|
[block]
|
||||||
(->>
|
(->>
|
||||||
|
|
|
@ -3492,7 +3492,7 @@
|
||||||
:skip-transact? false}
|
:skip-transact? false}
|
||||||
(doseq [block-id block-ids]
|
(doseq [block-id block-ids]
|
||||||
(when-let [block (db/entity [:block/uuid block-id])]
|
(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)
|
(when-not (= current-value value)
|
||||||
(let [block (outliner-core/block {:block/uuid block-id
|
(let [block (outliner-core/block {:block/uuid block-id
|
||||||
:block/collapsed? value})]
|
:block/collapsed? value})]
|
||||||
|
|
Loading…
Reference in New Issue