mirror of
https://github.com/logseq/logseq.git
synced 2026-05-04 02:46:45 +00:00
fix: paginated blocks
This commit is contained in:
@@ -65,12 +65,14 @@
|
||||
start-id' (or
|
||||
(when query-result (:db/id (last @query-result)))
|
||||
start-id)
|
||||
more-data (->> (db-model/get-paginated-blocks-no-cache db start-id' option)
|
||||
(map #(db/pull (:db/id %))))]
|
||||
more-data (db-model/get-paginated-blocks-no-cache db start-id' option)]
|
||||
(react/swap-new-result! query-k
|
||||
(fn [result]
|
||||
(->> (concat result more-data)
|
||||
(util/distinct-by :db/id))))))
|
||||
(fn [[entities structure-map]]
|
||||
(let [entities' (->> (concat entities more-data)
|
||||
(util/distinct-by :block/uuid))
|
||||
structure-map' (->> (concat structure-map (map (juxt :block/parent :block/left :block/collapsed?) more-data))
|
||||
(util/distinct-by :block/uuid))]
|
||||
[entities' structure-map'])))))
|
||||
|
||||
(defn indentable?
|
||||
[{:block/keys [parent left]}]
|
||||
|
||||
Reference in New Issue
Block a user