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();