// Hold tab autocomplete data\r
this.tabcomplete = {active: false, data: [], prefix: ''};\r
\r
- // When we get any nick change event for any connection, update our view just incase it's us\r
- _kiwi.gateway.bind('onnick', function (event) {\r
- $('.nick', that.$el).text(_kiwi.app.connections.active_connection.get('nick'));\r
+ // Keep the nick view updated with nick changes\r
+ _kiwi.app.connections.on('change:nick', function(connection) {\r
+ // Only update the nick view if it's the active connection\r
+ if (connection !== _kiwi.app.connections.active_connection)\r
+ return;\r
+\r
+ $('.nick', that.$el).text(connection.get('nick'));\r
});\r
\r
// Update our nick view as we flick between connections\r