@resolveio/client-lib-core 1.0.4 → 1.0.5

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.
@@ -4861,6 +4861,7 @@ class CoreComponent extends BaseComponent {
4861
4861
  this.connectedHeight = 0;
4862
4862
  this.isDevice = false;
4863
4863
  this.showNavigationMenu = false;
4864
+ this.swFlagAlert = null;
4864
4865
  this.isConnected = false;
4865
4866
  this.isConnecting = false;
4866
4867
  this.collapsableMenu = true;
@@ -4995,7 +4996,11 @@ class CoreComponent extends BaseComponent {
4995
4996
  if (this.environment.IS_PRODUCTION) {
4996
4997
  this._services._socket.subscribeBypassRoute('flagWithType', 'newSW').subscribe(flag => {
4997
4998
  if (flag) {
4998
- this._services._alert.setAlert('info', 'This page will reload once new version has been downloaded', 0);
4999
+ this.swFlagAlert = this._services._alert.setAlert('info', 'This page will reload once new version has been downloaded', 0);
5000
+ }
5001
+ else if (this.swFlagAlert) {
5002
+ this._services._alert.clearAlert(this.swFlagAlert.toastId);
5003
+ this.swFlagAlert = null;
4999
5004
  }
5000
5005
  });
5001
5006
  }