|
|
@@ -6,9 +6,9 @@
|
|
|
[logseq.common.config :as common-config]
|
|
|
[logseq.common.util :as common-util]
|
|
|
[logseq.common.util.date-time :as date-time-util]
|
|
|
+ [logseq.db.common.entity-plus :as entity-plus]
|
|
|
[logseq.db.common.entity-util :as common-entity-util]
|
|
|
[logseq.db.common.order :as db-order]
|
|
|
- [logseq.db.common.entity-plus :as entity-plus]
|
|
|
[logseq.db.frontend.entity-util :as entity-util]))
|
|
|
|
|
|
(defn- get-pages-by-name
|
|
|
@@ -309,10 +309,14 @@
|
|
|
(get-structured-datoms db))
|
|
|
recent-updated-pages (let [pages (get-recent-updated-pages db)]
|
|
|
(mapcat (fn [p] (d/datoms db :eavt (:db/id p))) pages))
|
|
|
- pages-datoms (let [contents-id (get-first-page-by-title db "Contents")
|
|
|
- views-id (get-first-page-by-title db common-config/views-page-name)]
|
|
|
- (mapcat #(d/datoms db :eavt %)
|
|
|
- (remove nil? [contents-id views-id])))
|
|
|
+ pages-datoms (if db-graph?
|
|
|
+ (let [contents-id (get-first-page-by-title db "Contents")
|
|
|
+ views-id (get-first-page-by-title db common-config/views-page-name)]
|
|
|
+ (mapcat #(d/datoms db :eavt %)
|
|
|
+ (remove nil? [contents-id views-id])))
|
|
|
+ ;; load all pages for file graphs
|
|
|
+ (->> (d/datoms db :avet :block/name)
|
|
|
+ (mapcat (fn [d] (d/datoms db :eavt (:e d))))))
|
|
|
data (distinct
|
|
|
(concat idents
|
|
|
structured-datoms
|
|
|
@@ -322,4 +326,4 @@
|
|
|
all-files
|
|
|
pages-datoms))]
|
|
|
{:schema schema
|
|
|
- :initial-data data}))
|
|
|
+ :initial-data data}))
|