Add notification count to notifications
This commit is contained in:
parent
24a7fe2d42
commit
54bb156f01
1 changed files with 12 additions and 2 deletions
|
@ -929,11 +929,21 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
$rootScope.createHighlight = function(buffer, message) {
|
||||
var title = '';
|
||||
var body = '';
|
||||
var numNotifications = buffer.notification;
|
||||
|
||||
if (['#', '&', '+', '!'].indexOf(buffer.shortName.charAt(0)) < 0) {
|
||||
if (numNotifications > 1) {
|
||||
title = numNotifications.toString() + ' private messages from ';
|
||||
} else {
|
||||
title = 'Private message from ';
|
||||
}
|
||||
body = message.text;
|
||||
} else {
|
||||
if (numNotifications > 1) {
|
||||
title = numNotifications.toString() + ' highlights in ';
|
||||
} else {
|
||||
title = 'Highlight in ';
|
||||
}
|
||||
var prefix = '';
|
||||
for (var i = 0; i < message.prefix.length; i++) {
|
||||
prefix += message.prefix[i].text;
|
||||
|
|
Loading…
Reference in a new issue