Skip to content

Commit 6dec074

Browse files
committed
comment out fn call instead of commenting out fn contents
1 parent 0c13cf3 commit 6dec074

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/cljs/nr/gameboard/log.cljs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,13 @@
5151
[s]
5252
(r/with-let [typing (r/cursor game-state [:typing])]
5353
(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?}])))))
6361

6462
(defn indicate-action []
6563
(when (not-spectator?)
@@ -145,7 +143,8 @@
145143
(reset-command-menu state)
146144
(swap! state assoc :command-matches (-> e .-target .-value (find-command-matches commands)))
147145
(swap! state assoc :msg (-> e .-target .-value))
148-
(send-typing state))
146+
;;(send-typing state)
147+
)
149148

150149
(defn command-menu [!input-ref state]
151150
(when (show-command-menu? @state)
@@ -184,7 +183,7 @@
184183
:autoComplete "off"
185184
:ref #(reset! !input-ref %)
186185
:value (:msg @state)
187-
:on-blur #(send-typing (atom nil))
186+
;;:on-blur #(send-typing (atom nil))
188187
:on-key-down #(command-menu-key-down-handler state %)
189188
:on-change #(log-input-change-handler state %)}]]]
190189
[indicate-action]

0 commit comments

Comments
 (0)