Merge pull request #193 from thelounge/astorije/minor-simplification
Remove unnecessary operation when sorting users
This commit is contained in:
commit
e54409b3dd
@ -28,14 +28,8 @@ Chan.prototype.sortUsers = function() {
|
||||
this.users,
|
||||
function(u) { return u.name.toLowerCase(); }
|
||||
);
|
||||
var modes = [
|
||||
"~",
|
||||
"&",
|
||||
"@",
|
||||
"%",
|
||||
"+",
|
||||
].reverse();
|
||||
modes.forEach(function(mode) {
|
||||
|
||||
["+", "%", "@", "&", "~"].forEach(function(mode) {
|
||||
this.users = _.remove(
|
||||
this.users,
|
||||
function(u) { return u.mode === mode; }
|
||||
|
Loading…
Reference in New Issue
Block a user