Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
debugger22 committed Oct 5, 2016
2 parents e4d1dce + d31b9c8 commit 31ec3b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/public/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var socket = io(document.location.hostname);
socket.on('github', function (data) {
$('.online-users-count').html(data.connected_users);
data.data.forEach(function(event){
if(!isEventInQueue(event) || shouldEventBeIgnored(event)){
if(!isEventInQueue(event)){
eventQueue.push(event);
}
});
Expand Down Expand Up @@ -233,7 +233,7 @@ function playSound(size, type) {

function playFromQueueExchange1(){
var event = eventQueue.shift();
if(event != null && event.message != null && svg != null){
if(event != null && event.message != null && !shouldEventBeIgnored(event) && svg != null){
playSound(event.message.length*1.1, event.type);
if(!document.hidden)
drawEvent(event, svg);
Expand All @@ -244,7 +244,7 @@ function playFromQueueExchange1(){

function playFromQueueExchange2(){
var event = eventQueue.shift();
if(event != null && event.message != null && svg != null){
if(event != null && event.message != null && !shouldEventBeIgnored(event) && svg != null){
playSound(event.message.length, event.type);
if(!document.hidden)
drawEvent(event, svg);
Expand Down

0 comments on commit 31ec3b0

Please sign in to comment.