Merge pull request #231 from lorenzhs/nicklistupdates
Ignore nicklist updates for buffers without a nicklist
This commit is contained in:
commit
d27d3b415d
1 changed files with 7 additions and 2 deletions
|
@ -49,14 +49,19 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
* Adds a nick to nicklist
|
* Adds a nick to nicklist
|
||||||
*/
|
*/
|
||||||
var addNick = function(group, nick) {
|
var addNick = function(group, nick) {
|
||||||
|
if (nicklistRequested()) {
|
||||||
nicklist[group].nicks.push(nick);
|
nicklist[group].nicks.push(nick);
|
||||||
flatnicklist = getFlatNicklist();
|
flatnicklist = getFlatNicklist();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* Deletes a nick from nicklist
|
* Deletes a nick from nicklist
|
||||||
*/
|
*/
|
||||||
var delNick = function(group, nick) {
|
var delNick = function(group, nick) {
|
||||||
group = nicklist[group];
|
group = nicklist[group];
|
||||||
|
if (group === undefined) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
group.nicks = _.filter(group.nicks, function(n) { return n.name !== nick.name;});
|
group.nicks = _.filter(group.nicks, function(n) { return n.name !== nick.name;});
|
||||||
flatnicklist = getFlatNicklist();
|
flatnicklist = getFlatNicklist();
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue