simplify ifs

pull/9312/head
RationalCoding 7 years ago
parent f694d66a50
commit 2e2f30334b
  1. 2
      client/notifications/notification.js

@ -44,6 +44,7 @@ Meteor.startup(function() {
KonchatNotification.showDesktop(notification);
}
} else {
if (!hasFocus || !messageIsInOpenedRoom) {
// Play a sound and show a notification.
KonchatNotification.newMessage(notification.payload.rid);
KonchatNotification.showDesktop(notification);
@ -67,6 +68,7 @@ Meteor.startup(function() {
// Play a notification sound
KonchatNotification.newMessage(notification.payload.rid);
}
} else if (!hasFocus || !messageIsInOpenedRoom || !muteFocusedConversations) {
// Play a notification sound
KonchatNotification.newMessage(notification.payload.rid);
}

Loading…
Cancel
Save