Fix unlinked loading screen hang, fix error dialog on start (#1440)
* main.js: check for truthiness of mainwindow, not === null FREEBIE * background.js: Connect to websocket even if we are unlinked We know registration isn't done, but it has been done before. So instead of sitting tight, we connect to the socket to start everything up and attempt to the websocket once more. FREEBIE
This commit is contained in:
parent
6e5afce7d2
commit
af81b1a045
2 changed files with 4 additions and 4 deletions
|
@ -159,7 +159,7 @@
|
|||
function connect(firstRun) {
|
||||
window.removeEventListener('online', connect);
|
||||
|
||||
if (!Whisper.Registration.isDone()) { return; }
|
||||
if (!Whisper.Registration.everDone()) { return; }
|
||||
if (Whisper.Import.isIncomplete()) { return; }
|
||||
|
||||
if (messageReceiver) { messageReceiver.close(); }
|
||||
|
|
6
main.js
6
main.js
|
@ -201,10 +201,10 @@ app.on('window-all-closed', function () {
|
|||
app.on('activate', function () {
|
||||
// On OS X it's common to re-create a window in the app when the
|
||||
// dock icon is clicked and there are no other windows open.
|
||||
if (mainWindow === null) {
|
||||
createWindow();
|
||||
} else {
|
||||
if (mainWindow) {
|
||||
mainWindow.show();
|
||||
} else {
|
||||
createWindow();
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue