Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/candy-chat/candy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSudrien <_+github@sudrien.net>2015-02-27 05:18:08 +0300
committerSudrien <_+github@sudrien.net>2015-02-27 05:18:08 +0300
commit4ce2c047eca35dd286d2e435c78c08d02de5e340 (patch)
tree2eddca194b69845b7f0bc14c1bd00455631d2fd3 /src
parent0b8e96c7c2d4bc0f602c7daeeea1d44b96f67495 (diff)
play notification sound on all unseen messages if updateWindowOnAllMessages configured
Diffstat (limited to 'src')
-rw-r--r--src/view/pane/message.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/view/pane/message.js b/src/view/pane/message.js
index 2e3a851..06b23f6 100644
--- a/src/view/pane/message.js
+++ b/src/view/pane/message.js
@@ -218,11 +218,14 @@ Candy.View.Pane = (function(self, $) {
// Check to see if in-core notifications are disabled
if(!Candy.Core.getOptions().disableCoreNotifications) {
- // Notify the user about a new private message
if(Candy.View.getCurrent().roomJid !== roomJid || !self.Window.hasFocus()) {
self.Chat.increaseUnreadMessages(roomJid);
- if(Candy.View.Pane.Chat.rooms[roomJid].type === 'chat' && !self.Window.hasFocus()) {
- self.Chat.Toolbar.playSound();
+ if(!self.Window.hasFocus()) {
+ // Notify the user about a new private message
+ // OR Notify on all messages is configured
+ if(Candy.View.Pane.Chat.rooms[roomJid].type === 'chat' || Candy.View.getOptions().updateWindowOnAllMessages === true) {
+ self.Chat.Toolbar.playSound();
+ }
}
}
}