mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
chore: comment out electron? feature gate
This commit is contained in:
@@ -124,10 +124,10 @@
|
||||
data (persist-db/<fetch-init-data repo)
|
||||
electron? (util/electron?)
|
||||
{:keys [conn uuid->db-id-map journal-blocks datoms-count]}
|
||||
(when-not electron? (sqlite-restore/restore-initial-data data {:conn-from-datoms-fn
|
||||
(comment electron? (sqlite-restore/restore-initial-data data {:conn-from-datoms-fn
|
||||
(fn profiled-d-conn [& args]
|
||||
(util/profile :restore-graph-from-sqlite!-init-db (apply d/conn-from-datoms args)))}))
|
||||
[conn datoms-count] (if electron?
|
||||
[conn datoms-count] (if true
|
||||
(do
|
||||
(assert (some? data) "No data found when reloading db")
|
||||
(let [datoms (dt/read-transit-str data)]
|
||||
@@ -143,7 +143,7 @@
|
||||
;; TODO: Store schema in sqlite
|
||||
;; (db-migrate/migrate attached-db)
|
||||
|
||||
(when-not electron?
|
||||
(comment when-not electron?
|
||||
(js/setTimeout
|
||||
(fn []
|
||||
(p/let [other-data (persist-db/<fetch-blocks-excluding repo (map :uuid journal-blocks))
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
(-> (p/let [^js sqlite (ensure-sqlite-init)
|
||||
;; <fetch-initital-data is called when init/re-loading graph
|
||||
;; the underlying DB should be opened
|
||||
_ (.openDB sqlite repo)]
|
||||
_ (.newDB sqlite repo)]
|
||||
(.getInitialData sqlite repo))
|
||||
(p/catch (fn [error]
|
||||
(prn ::fuck-error)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
(js/console.warn "TODO: list-db for electron is not implemented")
|
||||
[])
|
||||
(<unsafe-delete [_this _repo]
|
||||
(js/console.warn "TODO: delete")
|
||||
(js/console.warn "TODO: delete persidt-db on electron")
|
||||
(p/resolved nil))
|
||||
(<transact-data [_this repo tx-data tx-meta]
|
||||
(p->c
|
||||
|
||||
Reference in New Issue
Block a user