perf: slow switch to the editor mode for long pages

This commit is contained in:
Tienson Qin
2023-09-07 00:12:06 +08:00
parent a23068fec7
commit 0cbd6c09f8
10 changed files with 35 additions and 29 deletions

View File

@@ -717,7 +717,7 @@
(and
;; FIXME: this does not work on CI tests
util/node-test?
(:editor/editing? @state/state))))
(:editor/editing @state/state))))
(state/close-modal!)
(hide-context-menu-and-clear-selection e)))))))
[state route-match main-content]
@@ -742,7 +742,7 @@
home? (= :home route-name)
native-titlebar? (state/sub [:electron/user-cfgs :window/native-titlebar?])
window-controls? (and (util/electron?) (not util/mac?) (not native-titlebar?))
edit? (:editor/editing? @state/state)
edit? (:editor/editing @state/state)
default-home (get-default-home-if-valid)
logged? (user-handler/logged-in?)
fold-button-on-right? (state/enable-fold-button-right?)