Remove unnecessary operation when sorting users
This commit is contained in:
parent
f81235900b
commit
d02c0bd72c
@ -27,14 +27,8 @@ Chan.prototype.sortUsers = function() {
|
|||||||
this.users,
|
this.users,
|
||||||
function(u) { return u.name.toLowerCase(); }
|
function(u) { return u.name.toLowerCase(); }
|
||||||
);
|
);
|
||||||
var modes = [
|
|
||||||
"~",
|
["+", "%", "@", "&", "~"].forEach(function(mode) {
|
||||||
"&",
|
|
||||||
"@",
|
|
||||||
"%",
|
|
||||||
"+",
|
|
||||||
].reverse();
|
|
||||||
modes.forEach(function(mode) {
|
|
||||||
this.users = _.remove(
|
this.users = _.remove(
|
||||||
this.users,
|
this.users,
|
||||||
function(u) { return u.mode === mode; }
|
function(u) { return u.mode === mode; }
|
||||||
|
Loading…
Reference in New Issue
Block a user