From ad8f537b826f1959caa3c25d8b760eb8973f6eef Mon Sep 17 00:00:00 2001 From: ResidentBiscuit Date: Tue, 25 Nov 2014 16:16:59 -0600 Subject: [PATCH] Locate relevant code Add ability to close network and associated channel tabls Fix connection not ending Remove unnecessary check --- client/src/views/tabs.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/client/src/views/tabs.js b/client/src/views/tabs.js index fc81b42..8c48124 100644 --- a/client/src/views/tabs.js +++ b/client/src/views/tabs.js @@ -106,11 +106,8 @@ _kiwi.view.Tabs = Backbone.View.extend({ _kiwi.app.view.$el.find('.panellist .active').removeClass('active'); panel.tab.addClass('active'); - - // Only show the part image on non-server tabs - if (!panel.isServer()) { - panel.tab.append(''); - } + + panel.tab.append(''); }, tabClick: function (e) { @@ -133,8 +130,13 @@ _kiwi.view.Tabs = Backbone.View.extend({ // Only need to part if it's a channel // If the nicklist is empty, we haven't joined the channel as yet + // If we part a server, then we need to disconnect from server, close channel tabs, + // then close server tab if (panel.isChannel() && panel.get('members').models.length > 0) { this.model.network.gateway.part(panel.get('name')); + } else if(panel.isServer()) { + this.model.network.gateway.quit(); + _kiwi.app.connections.remove(_kiwi.app.connections.active_connection); } else { panel.close(); } -- 2.25.1