File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 51
51
[s]
52
52
(r/with-let [typing (r/cursor game-state [:typing ])]
53
53
(let [typing? (boolean (seq (:msg @s)))]
54
- ; ; note - temporarily disable to see if it impacts performance
55
- ; ; (when (and (not (:replay @game-state))
56
- ; ; ;; only send if the typing state is different
57
- ; ; (or (and (not @typing) typing?)
58
- ; ; (and (not typing?) @typing))
59
- ; ; (not-spectator?))
60
- ; ; (ws/ws-send! [:game/typing {:gameid (current-gameid app-state)
61
- ; ; :typing typing?}])))))
62
- )))
54
+ (when (and (not (:replay @game-state))
55
+ ; ; only send if the typing state is different
56
+ (or (and (not @typing) typing?)
57
+ (and (not typing?) @typing))
58
+ (not-spectator? ))
59
+ (ws/ws-send! [:game/typing {:gameid (current-gameid app-state)
60
+ :typing typing?}])))))
63
61
64
62
(defn indicate-action []
65
63
(when (not-spectator? )
145
143
(reset-command-menu state)
146
144
(swap! state assoc :command-matches (-> e .-target .-value (find-command-matches commands)))
147
145
(swap! state assoc :msg (-> e .-target .-value))
148
- (send-typing state))
146
+ ; ;(send-typing state)
147
+ )
149
148
150
149
(defn command-menu [!input-ref state]
151
150
(when (show-command-menu? @state)
184
183
:autoComplete " off"
185
184
:ref #(reset! !input-ref %)
186
185
:value (:msg @state)
187
- :on-blur #(send-typing (atom nil ))
186
+ ; ; :on-blur #(send-typing (atom nil))
188
187
:on-key-down #(command-menu-key-down-handler state %)
189
188
:on-change #(log-input-change-handler state %)}]]]
190
189
[indicate-action]
You can’t perform that action at this time.
0 commit comments