fix: can't collapse/expand in publishing

close #4304
pull/4524/head
Tienson Qin 2022-03-10 11:49:42 +08:00
parent c51967ca1f
commit b453fed819
2 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@
[frontend.db.migrate :as db-migrate]
[frontend.namespaces :refer [import-vars]]
[frontend.state :as state]
[frontend.config :as config]
[frontend.util :as util]
[promesa.core :as p]
[electron.ipc :as ipc]))
@ -123,7 +124,9 @@
;; reactive components
(react/refresh! repo tx-report)
(when-not (:new-graph? (:tx-meta tx-report)) ; skip initial txs
(when (and
(not config/publishing?)
(not (:new-graph? (:tx-meta tx-report)))) ; skip initial txs
(if (util/electron?)
(when-not (:dbsync? (:tx-meta tx-report))
;; sync with other windows if needed

View File

@ -72,6 +72,8 @@
(restore-state!)
(shortcut/refresh!)
(events/run!)
;; actually, there's no persist for publishing
(db/listen-and-persist! (state/get-current-repo))
(start))
(defn stop []