mirror of https://github.com/logseq/logseq
fix: don't start sync if not logged in or it's not a remote graph
parent
666981ef0b
commit
e9ee940873
|
@ -237,8 +237,7 @@
|
|||
|
||||
["Upload an asset" [[:editor/click-hidden-file-input :id]] "Upload file types like image, pdf, docx, etc.)"]
|
||||
|
||||
(state/deprecated-logged?)
|
||||
["Upload an image" [[:editor/click-hidden-file-input :id]]]
|
||||
;; ["Upload an image" [[:editor/click-hidden-file-input :id]]]
|
||||
)]
|
||||
|
||||
(markdown-headings)
|
||||
|
|
|
@ -2712,10 +2712,13 @@
|
|||
(go
|
||||
;; stop previous sync
|
||||
(<! (<sync-stop))
|
||||
(when-some [sm (sync-manager-singleton current-user-uuid graph-uuid
|
||||
(config/get-repo-dir repo) repo
|
||||
txid *sync-state)]
|
||||
(when (and repo (not (config/demo-graph? repo)))
|
||||
(when (and user-uuid graph-uuid txid
|
||||
(user/logged-in?)
|
||||
repo
|
||||
(not (config/demo-graph? repo)))
|
||||
(when-some [sm (sync-manager-singleton current-user-uuid graph-uuid
|
||||
(config/get-repo-dir repo) repo
|
||||
txid *sync-state)]
|
||||
;; 1. if remote graph has been deleted, clear graphs-txid.edn
|
||||
;; 2. if graphs-txid.edn's content isn't [user-uuid graph-uuid txid], clear it
|
||||
(if (not= 3 (count @graphs-txid))
|
||||
|
|
|
@ -1055,11 +1055,6 @@
|
|||
[]
|
||||
(:me @state))
|
||||
|
||||
(defn deprecated-logged?
|
||||
"Whether the user has logged in."
|
||||
[]
|
||||
false)
|
||||
|
||||
(defn set-db-restoring!
|
||||
[value]
|
||||
(set-state! :db/restoring? value))
|
||||
|
|
Loading…
Reference in New Issue