feat(ui): WIP number list block (own-property)

This commit is contained in:
charlie
2023-04-17 13:51:35 +08:00
parent cc58ea4888
commit ba42b12b09
4 changed files with 30 additions and 8 deletions

View File

@@ -297,10 +297,10 @@
(let [order-block-fn? #(some-> % :block/properties :logseq.order-list-type (= order-list-type))
prev-block-fn #(some->> (:db/id %) (db-model/get-prev-sibling (state/get-current-repo)))
prev-block (prev-block-fn block)]
(if prev-block
(letfn [(sibling-list [b]
(lazy-seq
(when (order-block-fn? b)
(cons b (sibling-list (prev-block-fn b))))))]
(count (sibling-list block)))
1)))
(letfn [(order-sibling-list [b]
(lazy-seq
(when (order-block-fn? b)
(cons b (order-sibling-list (prev-block-fn b))))))
(order-parent-list [b])]
(if prev-block
(count (order-sibling-list block)) 1))))