mirror of
https://github.com/logseq/logseq.git
synced 2026-04-29 00:24:51 +00:00
fix(mobile): reload web app if old db worker is still running
when switching back to the app.
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
(defonce *profile-state (volatile! {}))
|
||||
|
||||
(defonce *db-worker (atom nil))
|
||||
(defonce *db-worker-client-id (atom nil))
|
||||
(defonce *db-worker-client-id (atom (storage/get :db-worker-client-id)))
|
||||
(defonce *editor-info (atom nil))
|
||||
(defonce app-ready-promise (p/deferred))
|
||||
|
||||
@@ -2360,3 +2360,9 @@ Similar to re-frame subscriptions"
|
||||
[days]
|
||||
(reset! (:ui/highlight-recent-days @state) days)
|
||||
(storage/set :ui/highlight-recent-days days))
|
||||
|
||||
(defn set-db-worker-client-id!
|
||||
[new-id]
|
||||
(when new-id
|
||||
(reset! *db-worker-client-id new-id)
|
||||
(storage/set :db-worker-client-id new-id)))
|
||||
|
||||
Reference in New Issue
Block a user