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
pull/749/head
Scott Nonnenberg 8 years ago
parent 6e5afce7d2
commit af81b1a045
No known key found for this signature in database
GPG Key ID: A4931C09644C654B

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

@ -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…
Cancel
Save