refactor: rename fn params in frontend.db.model

This commit is contained in:
situ2001
2023-04-19 14:54:43 +08:00
committed by Tienson Qin
parent edae54c168
commit e5b123de5d

View File

@@ -906,14 +906,14 @@ independent of format as format specific heading characters are stripped"
(= "" (:block/content (db-utils/pull (:e (first datoms))))))))))
(defn parents-collapsed?
[repo block-id]
(when-let [block (:block/parent (get-block-parents-v2 repo block-id))]
[repo block-uuid]
(when-let [block (:block/parent (get-block-parents-v2 repo block-uuid))]
(->> (tree-seq map? (fn [x] [(:block/parent x)]) block)
(some util/collapsed?))))
(defn get-block-page
[repo block-id]
(when-let [block (db-utils/entity repo [:block/uuid block-id])]
[repo block-uuid]
(when-let [block (db-utils/entity repo [:block/uuid block-uuid])]
(db-utils/entity repo (:db/id (:block/page block)))))
(defn get-pages-by-name-partition