mirror of
https://github.com/thelounge/thelounge
synced 2024-11-27 06:20:26 +00:00
Remove unnecessary operation when sorting users
This commit is contained in:
parent
f81235900b
commit
d02c0bd72c
1 changed files with 2 additions and 8 deletions
|
@ -27,14 +27,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 a new issue