From bc2689fea1b6be7b4cde7ff9835a7a19a95fe49e Mon Sep 17 00:00:00 2001 From: Cory Chaplin Date: Thu, 27 Mar 2014 17:15:39 +0100 Subject: [PATCH] Remove data setting from render function in chanlist --- client/src/applets/chanlist.js | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/client/src/applets/chanlist.js b/client/src/applets/chanlist.js index c85bba8..9c9cccb 100644 --- a/client/src/applets/chanlist.js +++ b/client/src/applets/chanlist.js @@ -27,7 +27,7 @@ this.waiting = false; }, - render: function (override_channels) { + render: function () { var table = $('table', this.$el), tbody = table.children('tbody:first').detach(), that = this, @@ -35,13 +35,7 @@ this.sorting_channels = false; - if (override_channels !== undefined) { - that.channels = override_channels; - tbody.remove(); - this.sorting_channels = true; - } else { - this.channels = this.sortChannels(this.channels, this.order); - } + this.channels = this.sortChannels(this.channels, this.order); // Create the sort icon container and clean previous any previous ones if($('.applet_chanlist .users_title').find('span.chanlist_sort_users').length == 0) { @@ -111,10 +105,9 @@ }, sortChannelsClick: function(order) { - var that = this, - channels = this.sortChannels(that.channels, order); + this.channels = this.sortChannels(this.channels, order); - this.render(channels); + this.render(); }, sortChannels: function (channels, order) { -- 2.25.1