summaryrefslogtreecommitdiffhomepage
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/app.js18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/app.js b/app/app.js
index 8421735dee..452e940a2b 100644
--- a/app/app.js
+++ b/app/app.js
@@ -28,14 +28,16 @@ ipcRenderer.on('backend-info', (_event, args) => {
const credentials: IpcCredentials = args.credentials;
backend.setLocation(credentials.connectionString);
- backend.authenticate(credentials.sharedSecret);
- backend.sync();
- backend.autologin()
- .catch( e => {
- if (e.type === 'NO_ACCOUNT') {
- log.debug('No user set in the backend, showing window');
- ipcRenderer.send('show-window');
- }
+ backend.authenticate(credentials.sharedSecret)
+ .then(() => {
+ backend.sync();
+ backend.autologin()
+ .catch( e => {
+ if (e.type === 'NO_ACCOUNT') {
+ log.debug('No user set in the backend, showing window');
+ ipcRenderer.send('show-window');
+ }
+ });
});
});
ipcRenderer.on('disconnect', () => {