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
diff options
context:
space:
mode:
authorMichael Weibel <mweibel@users.noreply.github.com>2015-02-27 09:18:19 +0300
committerMichael Weibel <mweibel@users.noreply.github.com>2015-02-27 09:18:19 +0300
commit1e3d463e51b2853335279016648b8e983e3d3b84 (patch)
tree3fcae12f27b2342f12f6aa698a7744751f53f7c7
parent0b8e96c7c2d4bc0f602c7daeeea1d44b96f67495 (diff)
parent683f704b676fb05200d555c5da53f09bdff71656 (diff)
Merge pull request #369 from Sudrien/feature/extend_updateWindowOnAllMessages
Feature/extend update window on all messages
-rw-r--r--src/view/pane/message.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/view/pane/message.js b/src/view/pane/message.js
index 2e3a851..b4bcbb6 100644
--- a/src/view/pane/message.js
+++ b/src/view/pane/message.js
@@ -218,11 +218,13 @@ 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 on all messages if configured
+ if(Candy.View.Pane.Chat.rooms[roomJid].type === 'chat' || Candy.View.getOptions().updateWindowOnAllMessages === true) {
+ self.Chat.Toolbar.playSound();
+ }
}
}
}