mirror of https://github.com/logseq/logseq
fix: can't switch graphs
parent
e8b5a93a7e
commit
6d0378c0d1
|
@ -183,13 +183,14 @@
|
||||||
state/set-state! :sync-graph/init? false))
|
state/set-state! :sync-graph/init? false))
|
||||||
|
|
||||||
(defmethod handle :graph/switch [[_ graph opts]]
|
(defmethod handle :graph/switch [[_ graph opts]]
|
||||||
(p/let [^js sqlite @db-browser/*sqlite
|
(let [^js sqlite @db-browser/*sqlite]
|
||||||
writes-finished? (.file-writes-finished? sqlite)]
|
(p/let [writes-finished? (when sqlite (.file-writes-finished? sqlite))
|
||||||
(if (or writes-finished? (:sync-graph/init? @state/state))
|
writes-finished? (if (some? writes-finished?) writes-finished? true)]
|
||||||
(graph-switch-on-persisted graph opts)
|
(if (or writes-finished? (:sync-graph/init? @state/state))
|
||||||
(notification/show!
|
(graph-switch-on-persisted graph opts)
|
||||||
"Please wait seconds until all changes are saved for the current graph."
|
(notification/show!
|
||||||
:warning))))
|
"Please wait seconds until all changes are saved for the current graph."
|
||||||
|
:warning)))))
|
||||||
|
|
||||||
(defmethod handle :graph/pull-down-remote-graph [[_ graph dir-name]]
|
(defmethod handle :graph/pull-down-remote-graph [[_ graph dir-name]]
|
||||||
(if (mobile-util/native-ios?)
|
(if (mobile-util/native-ios?)
|
||||||
|
|
Loading…
Reference in New Issue