Closes #886, Fixes auth form showing until key info check finishes
This commit is contained in:
parent
ec72dd3909
commit
77a95b5e6d
1 changed files with 2 additions and 1 deletions
|
@ -30,7 +30,7 @@ Zotero_Preferences.Sync = {
|
||||||
init: Zotero.Promise.coroutine(function* () {
|
init: Zotero.Promise.coroutine(function* () {
|
||||||
this.updateStorageSettingsUI();
|
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();
|
var apiKey = Zotero.Sync.Data.Local.getAPIKey();
|
||||||
this.displayFields(apiKey ? username : "");
|
this.displayFields(apiKey ? username : "");
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ Zotero_Preferences.Sync = {
|
||||||
{timeout: 5000}
|
{timeout: 5000}
|
||||||
);
|
);
|
||||||
this.displayFields(keyInfo.username);
|
this.displayFields(keyInfo.username);
|
||||||
|
Zotero.Users.setCurrentUsername(keyInfo.username);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
// API key wrong/invalid
|
// API key wrong/invalid
|
||||||
|
|
Loading…
Add table
Reference in a new issue