@resolveio/client-lib-core 1.1.10 → 1.1.12

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.
@@ -1556,14 +1556,17 @@ class AccountManagerService {
1556
1556
  });
1557
1557
  }
1558
1558
  logOut() {
1559
- this._router.navigateByUrl('/home');
1560
- setTimeout(() => {
1561
- this.user.next(null);
1562
- this._token.removeToken('refreshToken');
1563
- this._token.removeToken('accessToken');
1564
- this._offline.removeUser();
1565
- this.closeSocket();
1566
- }, 500);
1559
+ return new Promise((resolve, reject) => {
1560
+ setTimeout(() => {
1561
+ this.user.next(null);
1562
+ this._token.removeToken('refreshToken');
1563
+ this._token.removeToken('accessToken');
1564
+ this._offline.removeUser();
1565
+ this.closeSocket();
1566
+ this._router.navigateByUrl('/home');
1567
+ resolve(true);
1568
+ }, 500);
1569
+ });
1567
1570
  }
1568
1571
  openSocket(token) {
1569
1572
  this._socket.openSocket(this.environment, [token]);
@@ -4572,10 +4575,9 @@ class NavbarMainComponent extends BaseComponent {
4572
4575
  }, 500);
4573
4576
  document.documentElement.style.setProperty('--font-size', this.fontSize + 'px');
4574
4577
  }
4575
- logout() {
4578
+ async logout() {
4576
4579
  this._app.isLoggingOut.next(true);
4577
- this._services._router.navigateByUrl('/home');
4578
- this._services._account.logOut();
4580
+ await this._services._account.logOut();
4579
4581
  this._app.isLoggingOut.next(false);
4580
4582
  }
4581
4583
  login() {