fix: sync crashes

1. make sure there's no sync reentrancy
2. there's no need to restore pwd after user input the password
This commit is contained in:
Tienson Qin
2022-11-05 04:35:20 +08:00
parent 6320217175
commit 564926418f
2 changed files with 209 additions and 202 deletions

View File

@@ -116,7 +116,7 @@
(if (instance? js/Error persist-r)
(js/console.error persist-r)
(when (fn? after-input-password)
(async/<! (after-input-password))
(after-input-password @*password)
;; TODO: it's better if based on sync state
(when init-graph-keys
(js/setTimeout #(state/pub-event! [:file-sync/maybe-onboarding-show :sync-learn]) 10000)))))))))))