fix: redirect to all pages for publishing graphs

pull/10896/head
Tienson Qin 2024-01-21 14:50:29 +08:00
parent 270389242a
commit 760a9f8c25
2 changed files with 11 additions and 16 deletions

View File

@ -418,7 +418,8 @@
(global-config-handler/restore-global-config!))
;; Don't have to unlisten the old listener, as it will be destroyed with the conn
(ui-handler/add-style-if-exists!)
(state/set-db-restoring! false)))
(when-not config/publishing?
(state/set-db-restoring! false))))
(defn rebuild-index!
[url]

View File

@ -59,20 +59,13 @@
(when-let [data js/window.logseq_db]
(let [repo (-> @state/state :config keys first)]
(state/set-current-repo! repo)
(p/do!
(repo-handler/restore-and-setup-repo! repo)
(state/set-db-restoring! true)
(let [data (unescape-html data)
(p/let [_ (repo-handler/restore-and-setup-repo! repo)
_ (let [data (unescape-html data)
db (db/string->db data)
datoms (d/datoms db :eavt)]
(db/transact! repo datoms {:init-db? true
:new-graph? true}))
:new-graph? true}))]
(state/set-db-restoring! false)
(ui-handler/re-render-root!)))))
(defn restore-state!
@ -117,6 +110,7 @@
(events/run!)
(p/do!
(db-browser/start-db-worker!)
(state/set-db-restoring! true)
(start)
(restore-from-transit-str!)))