File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 49
49
" Send a typing event to server for this user if it is not already set in game state AND user is not a spectator"
50
50
[s]
51
51
(r/with-let [typing (r/cursor game-state [:typing ])]
52
- (let [text ( :msg @s)]
52
+ (let [typing? ( boolean ( seq ( :msg @s)) )]
53
53
(when (and (not (:replay @game-state))
54
- (not @typing)
54
+ ; ; only send if the typing state is different
55
+ (or (and (not @typing) typing?)
56
+ (and (not typing?) @typing))
55
57
(not-spectator? ))
56
58
(ws/ws-send! [:game/typing {:gameid (current-gameid app-state)
57
- :typing ( boolean ( seq text)) }])))))
59
+ :typing typing? }])))))
58
60
59
61
(defn indicate-action []
60
62
(when (not-spectator? )
140
142
(reset-command-menu state)
141
143
(swap! state assoc :command-matches (-> e .-target .-value (find-command-matches commands)))
142
144
(swap! state assoc :msg (-> e .-target .-value))
143
- (send-typing state))
145
+ ; ;(send-typing state)
146
+ )
144
147
145
148
(defn command-menu [!input-ref state]
146
149
(when (show-command-menu? @state)
179
182
:autoComplete " off"
180
183
:ref #(reset! !input-ref %)
181
184
:value (:msg @state)
182
- :on-blur #(send-typing (atom nil ))
185
+ ; ; :on-blur #(send-typing (atom nil))
183
186
:on-key-down #(command-menu-key-down-handler state %)
184
187
:on-change #(log-input-change-handler state %)}]]]
185
188
[indicate-action]
You can’t perform that action at this time.
0 commit comments