Skip to content

Commit 31ec3b0

Browse files
committed
2 parents e4d1dce + d31b9c8 commit 31ec3b0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/public/js/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ var socket = io(document.location.hostname);
3636
socket.on('github', function (data) {
3737
$('.online-users-count').html(data.connected_users);
3838
data.data.forEach(function(event){
39-
if(!isEventInQueue(event) || shouldEventBeIgnored(event)){
39+
if(!isEventInQueue(event)){
4040
eventQueue.push(event);
4141
}
4242
});
@@ -233,7 +233,7 @@ function playSound(size, type) {
233233

234234
function playFromQueueExchange1(){
235235
var event = eventQueue.shift();
236-
if(event != null && event.message != null && svg != null){
236+
if(event != null && event.message != null && !shouldEventBeIgnored(event) && svg != null){
237237
playSound(event.message.length*1.1, event.type);
238238
if(!document.hidden)
239239
drawEvent(event, svg);
@@ -244,7 +244,7 @@ function playFromQueueExchange1(){
244244

245245
function playFromQueueExchange2(){
246246
var event = eventQueue.shift();
247-
if(event != null && event.message != null && svg != null){
247+
if(event != null && event.message != null && !shouldEventBeIgnored(event) && svg != null){
248248
playSound(event.message.length, event.type);
249249
if(!document.hidden)
250250
drawEvent(event, svg);

0 commit comments

Comments
 (0)