Merge pull request #193 from thelounge/astorije/minor-simplification

Remove unnecessary operation when sorting users
This commit is contained in:
Max-P 2016-03-14 20:55:49 -04:00
commit e54409b3dd

View File

@ -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; }