From: Cory Chaplin Date: Wed, 16 Jul 2014 19:19:34 +0000 (+0200) Subject: Better detection for last open panel X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b8ecf31adb0540703d2efe2657fcbb220a0c4156;p=KiwiIRC.git Better detection for last open panel --- diff --git a/client/src/views/application.js b/client/src/views/application.js index fe9ef3c..dd68619 100644 --- a/client/src/views/application.js +++ b/client/src/views/application.js @@ -383,13 +383,10 @@ _kiwi.view.Application = Backbone.View.extend({ panel_access.shift(); //Get the last-accessed panel model now that we removed the closed one - var model = kiwi.connections.active_connection.panels.getByCid(panel_access[0]); + var model = _.find(_kiwi.app.panels('applets').concat(_kiwi.app.panels('connections')), {cid: panel_access[0]}); if (model) { model.view.show(); - } else { - // This is a workaround because PanelList does not contain applets - kiwi.panels()[0].view.show(); } } });