mirror of
https://github.com/logseq/logseq.git
synced 2026-06-01 19:01:22 +00:00
fix: sync not start after binding a local folder to the remote graph
This commit is contained in:
@@ -367,7 +367,9 @@
|
||||
(nil? (second info))
|
||||
(not= (second info) (:GraphUUID graph))))
|
||||
(if (js/confirm "This directory is not empty, are you sure to sync the remote graph to it? Make sure to back up the directory first.")
|
||||
(p/resolved nil)
|
||||
(do
|
||||
(state/set-state! :graph/remote-binding? true)
|
||||
(p/resolved nil))
|
||||
(throw (js/Error. nil)))))))
|
||||
|
||||
;; cancel pick a directory
|
||||
|
||||
@@ -147,8 +147,11 @@
|
||||
(graph-switch graph))))
|
||||
|
||||
(defmethod handle :graph/switch [[_ graph opts]]
|
||||
(if @outliner-file/*writes-finished?
|
||||
(graph-switch-on-persisted graph opts)
|
||||
(if (or @outliner-file/*writes-finished?
|
||||
(:graph/remote-binding? @state/state))
|
||||
(do
|
||||
(state/set-state! :graph/remote-binding? false)
|
||||
(graph-switch-on-persisted graph opts))
|
||||
(notification/show!
|
||||
"Please wait seconds until all changes are saved for the current graph."
|
||||
:warning)))
|
||||
|
||||
Reference in New Issue
Block a user