|
|
@ -112,7 +112,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
socket.emit('api:notifications.mark_all_read', null, function() {
|
|
|
|
socket.emit('api:notifications.mark_all_read', null, function() {
|
|
|
|
notifIcon.toggleClass('active', false);
|
|
|
|
notifIcon.toggleClass('active', false);
|
|
|
|
utils.refreshTitle();
|
|
|
|
app.refreshTitle();
|
|
|
|
|
|
|
|
|
|
|
|
// Update favicon + local count
|
|
|
|
// Update favicon + local count
|
|
|
|
Tinycon.setBubble(0);
|
|
|
|
Tinycon.setBubble(0);
|
|
|
@ -167,7 +167,7 @@
|
|
|
|
type: 'warning',
|
|
|
|
type: 'warning',
|
|
|
|
timeout: 2000
|
|
|
|
timeout: 2000
|
|
|
|
});
|
|
|
|
});
|
|
|
|
utils.refreshTitle();
|
|
|
|
app.refreshTitle();
|
|
|
|
|
|
|
|
|
|
|
|
// Update the favicon + local storage
|
|
|
|
// Update the favicon + local storage
|
|
|
|
var savedCount = parseInt(localStorage.getItem('notifications:count'),10) || 0;
|
|
|
|
var savedCount = parseInt(localStorage.getItem('notifications:count'),10) || 0;
|
|
|
@ -209,7 +209,6 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
socket.on('chatMessage', function(data) {
|
|
|
|
socket.on('chatMessage', function(data) {
|
|
|
|
|
|
|
|
|
|
|
|
require(['chat'], function(chat) {
|
|
|
|
require(['chat'], function(chat) {
|
|
|
|
var modal = null;
|
|
|
|
var modal = null;
|
|
|
|
if (chat.modalExists(data.fromuid)) {
|
|
|
|
if (chat.modalExists(data.fromuid)) {
|
|
|
@ -220,10 +219,12 @@
|
|
|
|
chat.load(modal.attr('UUID'));
|
|
|
|
chat.load(modal.attr('UUID'));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
chat.toggleNew(modal.attr('UUID'), true);
|
|
|
|
chat.toggleNew(modal.attr('UUID'), true);
|
|
|
|
|
|
|
|
app.alternatingTitle(data.username + ' has messaged you');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
modal = chat.createModal(data.username, data.fromuid);
|
|
|
|
modal = chat.createModal(data.username, data.fromuid);
|
|
|
|
chat.toggleNew(modal.attr('UUID'), true);
|
|
|
|
chat.toggleNew(modal.attr('UUID'), true);
|
|
|
|
|
|
|
|
app.alternatingTitle(data.username + ' has messaged you');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|