Regard the weechat buffer notify level
This commit is contained in:
parent
38db2afe0a
commit
830c486af0
2 changed files with 8 additions and 4 deletions
|
@ -15,6 +15,8 @@ models.service('models', ['$rootScope', 'colors', function($rootScope, colors) {
|
|||
var title = message['title']
|
||||
var number = message['number']
|
||||
var pointer = message['pointers'][0]
|
||||
var local_variables = message['local_vars'];
|
||||
var notify = message['notify'];
|
||||
var lines = []
|
||||
var active = false
|
||||
var notification = 0
|
||||
|
@ -42,6 +44,8 @@ models.service('models', ['$rootScope', 'colors', function($rootScope, colors) {
|
|||
lastSeen: lastSeen,
|
||||
unread: unread,
|
||||
notification: notification,
|
||||
localvars: local_variables,
|
||||
notify: notify,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -199,12 +199,12 @@ weechat.factory('handlers', ['$rootScope', 'colors', 'models', 'plugins', functi
|
|||
}
|
||||
|
||||
if (!initial) {
|
||||
if (!buffer.active && _.contains(message.tags, 'notify_message') && !_.contains(message.tags, 'notify_none')) {
|
||||
if (!buffer.active && !buffer.notify==0 && _.contains(message.tags, 'notify_message') && !_.contains(message.tags, 'notify_none')) {
|
||||
buffer.unread++;
|
||||
$rootScope.$emit('notificationChanged');
|
||||
}
|
||||
|
||||
if(message.highlight || _.contains(message.tags, 'notify_private') ) {
|
||||
if(!buffer.notify==0 && message.highlight || _.contains(message.tags, 'notify_private') ) {
|
||||
buffer.notification++;
|
||||
$rootScope.createHighlight(buffer, message);
|
||||
$rootScope.$emit('notificationChanged');
|
||||
|
@ -321,7 +321,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
|
|||
}));
|
||||
doSendWithCallback(WeeChatProtocol.formatHdata({
|
||||
path: 'buffer:gui_buffers(*)',
|
||||
keys: ['number,full_name,short_name,title']
|
||||
keys: ['local_variables,notify,number,full_name,short_name,title']
|
||||
})).then(function(message) {
|
||||
$log.info("Parsing bufinfo");
|
||||
var bufferInfos = message['objects'][0]['content'];
|
||||
|
|
Loading…
Reference in a new issue