From 321eb20b7af67a5bb3a116c6f75de6100bede418 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Wed, 22 May 2013 05:25:34 +0100 Subject: [PATCH] Moving "joining channel..." removal to view --- client/assets/dev/model_channel.js | 6 ------ client/assets/dev/view.js | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/client/assets/dev/model_channel.js b/client/assets/dev/model_channel.js index aca182b..965c710 100644 --- a/client/assets/dev/model_channel.js +++ b/client/assets/dev/model_channel.js @@ -19,12 +19,6 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({ members.bind("add", function (member) { var show_message = _kiwi.global.settings.get('show_joins_parts'); if (show_message === false) { - // TODO: This might be better off being moved to the view at some point. - if (member.get('nick') === that.collection.network.get('nick')) { - this.view.$el.find('.initial_loader').slideUp(function () { - $(this).remove(); - }); - } return; } diff --git a/client/assets/dev/view.js b/client/assets/dev/view.js index d5dce46..fd9b9f8 100644 --- a/client/assets/dev/view.js +++ b/client/assets/dev/view.js @@ -703,6 +703,13 @@ _kiwi.view.Channel = _kiwi.view.Panel.extend({ initialize: function (options) { this.initializePanel(options); this.model.bind('change:topic', this.topic, this); + this.model.get('members').bind('add', function (member) { + if (member.get('nick') === that.collection.network.get('nick')) { + this.view.$el.find('.initial_loader').slideUp(function () { + $(this).remove(); + }); + } + }, this); // Only show the loader if this is a channel (ie. not a query) if (this.model.isChannel()) { -- 2.25.1