fix: bad performance due to ui/tippy sub state

This commit is contained in:
Tienson Qin
2023-10-25 19:29:21 +08:00
parent 9cd3327794
commit b19e42938c
7 changed files with 50 additions and 52 deletions

View File

@@ -107,7 +107,7 @@
(when-let [touches (.-targetTouches event)]
(let [selection-type (.-type (.getSelection js/document))]
(when-not (= selection-type "Range")
(when (or (not (state/sub :editor/editing))
(when (or (not @state/*editor-editing-ref)
(< (- (js/Date.now) @*touch-start) 600))
(when (and (= (.-length touches) 1) @*swipe)
(let [{:keys [x0 xi direction]} @*swipe