init plugin after log in

This commit is contained in:
Artur
2025-11-05 10:55:38 +03:00
parent de2ad88b43
commit abb9000a5d
2 changed files with 9 additions and 2 deletions

View File

@ -377,7 +377,7 @@
if (apikey) {
sdk.setApiKey(apikey)
.then(function () {
ZoteroApiChecker.stopApisChecker();
ZoteroApiChecker.successfullyLoggedInUsingApiKey();
switchAuthState("main");
})
.catch(function (err) {

View File

@ -67,8 +67,15 @@ var ZoteroApiChecker = {
checkStatus: function (sdk) {
return this._checkApiAvailable(sdk);
},
stopApisChecker: function () {
successfullyLoggedInUsingApiKey: function () {
this._done = true;
this._callback({
online: true,
hasKey: true,
desktop: this._desktop,
hasPermission: this._hasPermission,
desktopVersion: this._desktopVersion,
});
},
_checkApiAvailable: function (sdk) {