From 11633d7d87700b670f8f7c5794809b4db086d95b Mon Sep 17 00:00:00 2001 From: lilia Date: Mon, 24 Jul 2017 17:09:26 +0200 Subject: [PATCH] Make debug log available from the installer Move debug log from inbox view to app view so it can be opened regardless of whether we are showing the inbox view or the installer. // FREEBIE --- js/background.js | 2 +- js/views/app_view.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/js/background.js b/js/background.js index cc1468fdc..420e77768 100644 --- a/js/background.js +++ b/js/background.js @@ -79,7 +79,7 @@ } Whisper.events.on('showDebugLog', function() { - appView.inboxView.showDebugLog(); + appView.openDebugLog(); }); Whisper.events.on('unauthorized', function() { appView.inboxView.networkStatusView.update(); diff --git a/js/views/app_view.js b/js/views/app_view.js index ac6a7b23c..1d2ed39d2 100644 --- a/js/views/app_view.js +++ b/js/views/app_view.js @@ -18,6 +18,17 @@ this.el.append(view.el); this.delegateEvents(); }, + openDebugLog: function() { + this.closeDebugLog(); + this.debugLogView = new Whisper.DebugLogView(); + this.debugLogView.$el.appendTo(this.el); + }, + closeDebugLog: function() { + if (this.debugLogView) { + this.debugLogView.remove(); + this.debugLogView = null; + } + }, openInstaller: function() { this.closeInstaller(); this.installView = new Whisper.InstallView();