From 77a95b5e6db6335642d82fe7ac0d2ceb7e82ca00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adomas=20Ven=C4=8Dkauskas?= Date: Tue, 22 Dec 2015 15:33:38 +0000 Subject: [PATCH] Closes #886, Fixes auth form showing until key info check finishes --- chrome/content/zotero/preferences/preferences_sync.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/preferences/preferences_sync.js b/chrome/content/zotero/preferences/preferences_sync.js index 0502befd8..711bb63ea 100644 --- a/chrome/content/zotero/preferences/preferences_sync.js +++ b/chrome/content/zotero/preferences/preferences_sync.js @@ -30,7 +30,7 @@ Zotero_Preferences.Sync = { init: Zotero.Promise.coroutine(function* () { this.updateStorageSettingsUI(); - var username = Zotero.Users.getCurrentUsername() || ""; + var username = Zotero.Users.getCurrentUsername() || Zotero.Prefs.get('sync.server.username') || " "; var apiKey = Zotero.Sync.Data.Local.getAPIKey(); this.displayFields(apiKey ? username : ""); @@ -46,6 +46,7 @@ Zotero_Preferences.Sync = { {timeout: 5000} ); this.displayFields(keyInfo.username); + Zotero.Users.setCurrentUsername(keyInfo.username); } catch (e) { // API key wrong/invalid