@resolveio/client-lib-core 1.1.9 → 1.1.11

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.
@@ -1333,7 +1333,9 @@ class SocketManagerService {
1333
1333
  }
1334
1334
  else {
1335
1335
  if (data[4] === 'insertDocument') {
1336
- this._alert.setAlert('warning', 'This insert command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');
1336
+ if (data[5] !== 'driver-gps') {
1337
+ this._alert.setAlert('warning', 'This insert command has not taken place on the server yet because you are offline. It will automatically sync up next time you are online as long as you do not clear your cache!');
1338
+ }
1337
1339
  this._offline.insertDocument('collectionUpdate', {
1338
1340
  type: 'insert',
1339
1341
  data: data,
@@ -1554,14 +1556,17 @@ class AccountManagerService {
1554
1556
  });
1555
1557
  }
1556
1558
  logOut() {
1557
- this._router.navigateByUrl('/home');
1558
- setTimeout(() => {
1559
- this.user.next(null);
1560
- this._token.removeToken('refreshToken');
1561
- this._token.removeToken('accessToken');
1562
- this._offline.removeUser();
1563
- this.closeSocket();
1564
- }, 500);
1559
+ return new Promise((resolve, reject) => {
1560
+ this._router.navigateByUrl('/home');
1561
+ setTimeout(() => {
1562
+ this.user.next(null);
1563
+ this._token.removeToken('refreshToken');
1564
+ this._token.removeToken('accessToken');
1565
+ this._offline.removeUser();
1566
+ this.closeSocket();
1567
+ resolve(true);
1568
+ }, 500);
1569
+ });
1565
1570
  }
1566
1571
  openSocket(token) {
1567
1572
  this._socket.openSocket(this.environment, [token]);
@@ -4570,10 +4575,11 @@ class NavbarMainComponent extends BaseComponent {
4570
4575
  }, 500);
4571
4576
  document.documentElement.style.setProperty('--font-size', this.fontSize + 'px');
4572
4577
  }
4573
- logout() {
4578
+ async logout() {
4574
4579
  this._app.isLoggingOut.next(true);
4575
4580
  this._services._router.navigateByUrl('/home');
4576
- this._services._account.logOut();
4581
+ await this._services._account.logOut();
4582
+ this._app.isLoggingOut.next(false);
4577
4583
  }
4578
4584
  login() {
4579
4585
  this.auth.loginUser().then(() => { }, err => { });