From 9966ae4a2fdf840c1327d8cf09fc217583aea452 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Mon, 20 May 2013 02:44:37 +0100 Subject: [PATCH] Remove "Joining channel..." properly when show joins/parts is off. Fixes #249 --- client/assets/dev/model_channel.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/assets/dev/model_channel.js b/client/assets/dev/model_channel.js index 10669a5..aca182b 100644 --- a/client/assets/dev/model_channel.js +++ b/client/assets/dev/model_channel.js @@ -3,7 +3,8 @@ _kiwi.model.Channel = _kiwi.model.Panel.extend({ initialize: function (attributes) { var name = this.get("name") || "", - members; + members, + that = this; this.view = new _kiwi.view.Channel({"model": this, "name": name}); this.set({ @@ -18,9 +19,15 @@ _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; } - + this.addMsg(' ', '== ' + member.displayNick(true) + ' has joined', 'action join'); }, this); -- 2.25.1