added sounds for incoming and outgoing chat, and new notification

This commit is contained in:
Julian Lam
2014-03-11 17:47:13 -04:00
parent 4cb9f34253
commit 3dc4fd9fd9
5 changed files with 50 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
define(function() {
define(['sound'], function(sound) {
var Notifications = {};
Notifications.prepareDOM = function() {
@@ -108,6 +108,8 @@ define(function() {
var savedCount = parseInt(localStorage.getItem('notifications:count'), 10) || 0;
updateNotifCount(savedCount + 1);
sound.play('notification');
});
socket.on('event:notifications.updateCount', function(count) {
updateNotifCount(count);