fix: notify graph dir is gone when starting or running the apps

Also, disabled both re-index and refresh when logseq detects that
a graph's dir doesn't exists anymore.
This commit is contained in:
Tienson Qin
2022-06-10 18:04:15 +08:00
parent 7d3a536bc8
commit b7ae3684be
11 changed files with 126 additions and 97 deletions

View File

@@ -327,9 +327,11 @@
_ (ok-handler)]
(state/set-nfs-refreshing! false))))
;; TODO: move to frontend.handler.repo
(defn refresh!
[repo ok-handler]
(when repo
(when (and repo
(not (state/unlinked-dir? (config/get-repo-dir repo))))
(state/set-nfs-refreshing! true)
(p/let [_ (reload-dir! repo)
_ (ok-handler)]