mirror of
https://github.com/logseq/logseq.git
synced 2026-05-03 18:36:43 +00:00
enhance: when search, zoom in to a block if it's a long page
This commit is contained in:
@@ -4,6 +4,18 @@
|
||||
[frontend.db :as db]
|
||||
[frontend.format.block :as block]))
|
||||
|
||||
;; lazy loading
|
||||
|
||||
(def initial-blocks-length 200)
|
||||
|
||||
(def step-loading-blocks 50)
|
||||
|
||||
;; Fns
|
||||
|
||||
(defn long-page?
|
||||
[repo page-id]
|
||||
(>= (db/get-page-blocks-count repo page-id) initial-blocks-length))
|
||||
|
||||
(defn get-block-ids
|
||||
[block]
|
||||
(let [ids (atom [])
|
||||
|
||||
Reference in New Issue
Block a user