fix: disable auto-save when the editor is in composition

This commit is contained in:
Tienson Qin
2021-02-09 14:31:30 +08:00
parent 1c75042f5b
commit a7cb97c3f2
3 changed files with 17 additions and 6 deletions

View File

@@ -71,6 +71,7 @@
:editor/show-input nil
:editor/last-saved-cursor nil
:editor/editing? nil
:editor/in-composition? false
:editor/pos 0
:editor/content {}
:editor/block nil
@@ -981,6 +982,14 @@
[value]
(set-state! :graph/syncing? value))
(defn set-editor-in-composition!
[value]
(set-state! :editor/in-composition? value))
(defn editor-in-composition?
[]
(:editor/in-composition? @state))
(defn set-loading-files!
[value]
(set-state! :repo/loading-files? value))