From cbee5a884c81d1406b36c4116483ce1ae4da721f Mon Sep 17 00:00:00 2001 From: sachaaaaa Date: Wed, 2 Oct 2019 12:55:53 +1000 Subject: [PATCH 1/2] Secondary device to update device mapping to server after lokiFileServerAPI creation --- js/background.js | 4 ++++ js/views/standalone_registration_view.js | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/background.js b/js/background.js index 6cd03605d..2f5c7c47a 100644 --- a/js/background.js +++ b/js/background.js @@ -255,6 +255,10 @@ window.lokiP2pAPI.on('online', ConversationController._handleOnline); window.lokiP2pAPI.on('offline', ConversationController._handleOffline); initialisedAPI = true; + + if (storage.get('isSecondaryDevice')) { + window.lokiFileServerAPI.updateOurDeviceMapping(); + } }; function mapOldThemeToNew(theme) { diff --git a/js/views/standalone_registration_view.js b/js/views/standalone_registration_view.js index 8ce1f713c..4a2310fb7 100644 --- a/js/views/standalone_registration_view.js +++ b/js/views/standalone_registration_view.js @@ -146,7 +146,6 @@ }, async onSecondaryDeviceRegistered() { clearInterval(this.pairingInterval); - await lokiFileServerAPI.updateOurDeviceMapping(); // Ensure the left menu is updated Whisper.events.trigger('userChanged', { isSecondaryDevice: true }); // will re-run the background initialisation From b5924c5bad044ab74524275e6e8a8adbbf09b650 Mon Sep 17 00:00:00 2001 From: sachaaaaa Date: Wed, 2 Oct 2019 13:29:27 +1000 Subject: [PATCH 2/2] lint --- js/views/standalone_registration_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/views/standalone_registration_view.js b/js/views/standalone_registration_view.js index 4a2310fb7..4486e765c 100644 --- a/js/views/standalone_registration_view.js +++ b/js/views/standalone_registration_view.js @@ -5,7 +5,7 @@ i18n, passwordUtil, _, - lokiFileServerAPI */ +*/ /* eslint-disable more/no-then */