mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
chore: remove main thread db listener since it's moved to worker
This commit is contained in:
@@ -73,7 +73,6 @@
|
||||
[logseq.common.config :as common-config]
|
||||
[promesa.core :as p]
|
||||
[rum.core :as rum]
|
||||
[frontend.db.listener :as db-listener]
|
||||
[frontend.persist-db.browser :as db-browser]
|
||||
[frontend.db.rtc.debug-ui :as rtc-debug-ui]
|
||||
[frontend.modules.outliner.pipeline :as pipeline]
|
||||
@@ -550,7 +549,6 @@
|
||||
(catch :default e
|
||||
(js/console.error e)))
|
||||
(state/set-current-repo! current-repo)
|
||||
(db-listener/listen-and-persist! current-repo)
|
||||
(repo-config-handler/restore-repo-config! current-repo)
|
||||
(when graph-switch-f (graph-switch-f current-repo true))
|
||||
(.watch mobile-util/fs-watcher #js {:path current-repo-dir})
|
||||
|
||||
@@ -35,8 +35,7 @@
|
||||
[clojure.core.async :as async]
|
||||
[frontend.mobile.util :as mobile-util]
|
||||
[medley.core :as medley]
|
||||
[logseq.common.path :as path]
|
||||
[frontend.db.listener :as db-listener]))
|
||||
[logseq.common.path :as path]))
|
||||
|
||||
;; Project settings should be checked in two situations:
|
||||
;; 1. User changes the config.edn directly in logseq.com (fn: alter-file)
|
||||
@@ -367,8 +366,7 @@
|
||||
(state/set-current-repo! repo)
|
||||
(db/start-db-conn! repo (merge
|
||||
opts
|
||||
{:listen-handler db-listener/listen-and-persist!
|
||||
:db-graph? (config/db-based-graph? repo)})))
|
||||
{:db-graph? (config/db-based-graph? repo)})))
|
||||
|
||||
(defn- setup-demo-repo-if-not-exists-impl!
|
||||
[]
|
||||
@@ -378,7 +376,7 @@
|
||||
repo-dir (config/get-repo-dir repo)]
|
||||
(p/do! (fs/mkdir-if-not-exists repo-dir) ;; create memory://local
|
||||
(state/set-current-repo! repo)
|
||||
(db/start-db-conn! repo {:listen-handler db-listener/listen-and-persist!})
|
||||
(db/start-db-conn! repo {})
|
||||
(when-not config/publishing?
|
||||
(let [dummy-notes (t :tutorial/dummy-notes)]
|
||||
(create-dummy-notes-page repo dummy-notes)))
|
||||
@@ -416,7 +414,6 @@
|
||||
(when (config/global-config-enabled?)
|
||||
(global-config-handler/restore-global-config!))
|
||||
;; Don't have to unlisten the old listener, as it will be destroyed with the conn
|
||||
(db-listener/listen-and-persist! repo)
|
||||
(ui-handler/add-style-if-exists!)
|
||||
(state/set-db-restoring! false)))
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
[lambdaisland.glogi :as log]
|
||||
[logseq.common.util :as common-util]
|
||||
[promesa.core :as p]
|
||||
[frontend.db.listener :as db-listener]
|
||||
[frontend.persist-db :as persist-db]))
|
||||
|
||||
(defn remove-ignore-files
|
||||
@@ -297,8 +296,7 @@
|
||||
(search/reset-indice! repo)
|
||||
(db/remove-conn! repo)
|
||||
(db/clear-query-state!)
|
||||
(db/start-db-conn! repo {:listen-handler db-listener/listen-and-persist!
|
||||
:db-graph? (config/db-based-graph? repo)})
|
||||
(db/start-db-conn! repo {:db-graph? (config/db-based-graph? repo)})
|
||||
(reload-dir! repo {:re-index? true
|
||||
:ok-handler ok-handler}))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user