gologin 2.1.8 → 2.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/gologin.js +5 -4
package/package.json
CHANGED
package/src/gologin.js
CHANGED
|
@@ -60,7 +60,7 @@ export class GoLogin {
|
|
|
60
60
|
this.profileOs = 'lin';
|
|
61
61
|
this.waitWebsocket = options.waitWebsocket ?? true;
|
|
62
62
|
this.isEmptyFonts = false;
|
|
63
|
-
|
|
63
|
+
this.isFirstSession = false;
|
|
64
64
|
this.isCloudHeadless = options.isCloudHeadless ?? true;
|
|
65
65
|
|
|
66
66
|
this.tmpdir = tmpdir();
|
|
@@ -440,8 +440,10 @@ export class GoLogin {
|
|
|
440
440
|
height: parseInt(screenHeight, 10),
|
|
441
441
|
};
|
|
442
442
|
if (profile.storageInfo.isNewProfile) {
|
|
443
|
+
this.isFirstSession = true;
|
|
443
444
|
await this.createZeroProfile(profile.createCookiesTableQuery);
|
|
444
445
|
} else {
|
|
446
|
+
this.isFirstSession = false;
|
|
445
447
|
await this.downloadProfileAndExtract(profile, local);
|
|
446
448
|
}
|
|
447
449
|
|
|
@@ -924,7 +926,7 @@ export class GoLogin {
|
|
|
924
926
|
params = params.concat(this.extra_params);
|
|
925
927
|
}
|
|
926
928
|
|
|
927
|
-
if (this.restoreLastSession) {
|
|
929
|
+
if (!this.isFirstSession && this.restoreLastSession) {
|
|
928
930
|
params.push('--restore-last-session');
|
|
929
931
|
}
|
|
930
932
|
|
|
@@ -975,12 +977,11 @@ export class GoLogin {
|
|
|
975
977
|
await this.uploadProfileCookiesToServer();
|
|
976
978
|
}
|
|
977
979
|
|
|
978
|
-
await this.saveBookmarksToDb();
|
|
979
|
-
|
|
980
980
|
this.is_stopping = true;
|
|
981
981
|
await this.sanitizeProfile();
|
|
982
982
|
|
|
983
983
|
if (is_posting) {
|
|
984
|
+
await this.saveBookmarksToDb();
|
|
984
985
|
await this.commitProfile();
|
|
985
986
|
}
|
|
986
987
|
|