use atom to replace some high frequency used state vars

This commit is contained in:
rcmerci
2023-06-01 00:13:28 +08:00
parent d0d56cc65a
commit 628a8b3826
11 changed files with 143 additions and 99 deletions

View File

@@ -470,7 +470,7 @@
(when-let [pos (some-> (state/get-input) cursor/pos)]
(state/set-editor-last-pos! pos)))
:onStop (fn [_event]
(when-let [block (get-in @state/state [:editor/block :block/uuid])]
(when-let [block (get @(get @state/state :editor/block) :block/uuid)]
(editor-handler/edit-block! block :max (:block/uuid block))
(when-let [input (state/get-input)]
(when-let [saved-cursor (state/get-editor-last-pos)]