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 6b91528d8..20c5298d5 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 */ @@ -147,7 +147,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