Fix global directory watcher not working for multiple windows

Fix also simplifies global config component and generalizes file watcher
to handle any global directory. Also fixed intermittent, annoying "object could not
be cloned" error
This commit is contained in:
Gabriel Horner
2022-09-07 21:42:28 -04:00
committed by Andelf
parent 12b8592f9b
commit 6e3f784626
5 changed files with 113 additions and 82 deletions

View File

@@ -32,7 +32,6 @@
[frontend.handler.page :as page-handler]
[frontend.handler.plugin :as plugin-handler]
[frontend.handler.repo :as repo-handler]
[frontend.handler.global-config :as global-config-handler]
[frontend.handler.repo-config :as repo-config-handler]
[frontend.handler.route :as route-handler]
[frontend.handler.search :as search-handler]
@@ -121,7 +120,6 @@
(route-handler/redirect-to-home!))
(when-let [dir-name (config/get-repo-dir graph)]
(fs/watch-dir! dir-name))
(global-config-handler/re-watch-dir! graph)
(srs/update-cards-due-count!)
(state/pub-event! [:graph/ready graph])
(repo-handler/refresh-repos!)