refactor: mv file graph model fns to their own ns

All these fns are only used by file graphs. Most only act on file only
attributes e.g. :block/file, :block/pre-block? and :block/namespace
This commit is contained in:
Gabriel Horner
2025-05-07 13:27:01 -04:00
committed by Tienson Qin
parent 0b2c1d4a0a
commit b985020d1f
26 changed files with 311 additions and 300 deletions

View File

@@ -9,6 +9,7 @@
[frontend.date :as date]
[frontend.db :as db]
[frontend.db.async :as db-async]
[frontend.db.file-based.model :as file-model]
[frontend.fs :as fs]
[frontend.state :as state]
[frontend.ui :as ui]
@@ -103,7 +104,7 @@
(let [repo-dir (config/get-repo-dir (state/get-current-repo))
rel-path (when (string/starts-with? path repo-dir)
(path/trim-dir-prefix repo-dir path))
title (db/get-file-page (or path rel-path))
title (file-model/get-file-page (or path rel-path))
in-db? (when-not (path/absolute? path)
(boolean (db/get-file (or path rel-path))))
file-path (cond