Do not play sounds on initial load.

This commit is contained in:
Martin Edenhofer 2015-11-16 11:32:26 +01:00
parent 404c82f427
commit a1ed58f6e6

View file

@ -81,7 +81,10 @@ class App.CustomerChat extends App.Controller
# play on changes # play on changes
if @lastWaitingChatCount isnt counter if @lastWaitingChatCount isnt counter
@sounds.chat_new.play()
# do not play sound on initial load
if counter > 0 && @lastWaitingChatCount isnt undefined
@sounds.chat_new.play()
@lastWaitingChatCount = counter @lastWaitingChatCount = counter
# collect chat window messages # collect chat window messages