From: Cory Chaplin Date: Thu, 27 Mar 2014 16:15:39 +0000 (+0100) Subject: Remove data setting from render function in chanlist X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=bc2689fea1b6be7b4cde7ff9835a7a19a95fe49e;p=KiwiIRC.git Remove data setting from render function in chanlist --- 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) {