Two fixes for tricky import/register scenarios (#2072)

* Clear data on finish of new install, unless re-link/light import

* Don't show setup options in file menu in middle of light import

* Naming changes to address feedback
This commit is contained in:
Scott Nonnenberg 2018-02-26 15:45:28 -08:00 committed by GitHub
parent ae75390acc
commit 2a384cef7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 8 deletions

View file

@ -54,7 +54,7 @@
},
finishLightImport: function() {
var options = {
startStep: Whisper.InstallView.Steps.SCAN_QR_CODE,
hasExistingData: true
};
this.openInstaller(options);
},
@ -65,7 +65,16 @@
}
},
openInstaller: function(options) {
window.addSetupMenuItems();
options = options || {};
// If we're in the middle of import, we don't want to show the menu options
// allowing the user to switch to other ways to set up the app. If they
// switched back and forth in the middle of a light import, they'd lose all
// that imported data.
if (!options.hasExistingData) {
window.addSetupMenuItems();
}
this.resetViews();
var installView = this.installView = new Whisper.InstallView(options);
this.openView(this.installView);