From: Jack Allnutt Date: Mon, 20 May 2013 01:44:37 +0000 (+0100) Subject: Remove "Joining channel..." properly when show joins/parts is off. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9966ae4a2fdf840c1327d8cf09fc217583aea452;p=KiwiIRC.git Remove "Joining channel..." properly when show joins/parts is off. Fixes #249 --- 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);