@smartbit4all/ng-client 3.3.196 → 3.3.198

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.
@@ -8768,10 +8768,16 @@ class SmartSessionTimerService {
8768
8768
  this._destroy$.complete();
8769
8769
  }
8770
8770
  startTimer() {
8771
- let sessionInfoData = this.session.sessionInfoData;
8772
- let expiration = new Date(sessionInfoData.expiration);
8773
- let now = new Date();
8774
- this.timeLeftInSeconds = Math.floor((expiration.getTime() - now.getTime()) / 1000);
8771
+ const sessionInfoData = this.session.sessionInfoData;
8772
+ const lifetimeSeconds = sessionInfoData?.duration;
8773
+ if (lifetimeSeconds && lifetimeSeconds !== 0) {
8774
+ this.timeLeftInSeconds = lifetimeSeconds;
8775
+ }
8776
+ else {
8777
+ const expiration = new Date(sessionInfoData.expiration);
8778
+ const now = new Date();
8779
+ this.timeLeftInSeconds = Math.floor((expiration.getTime() - now.getTime()) / 1000);
8780
+ }
8775
8781
  this.timer = setInterval(() => {
8776
8782
  this.timeLeftInSeconds--;
8777
8783
  if (this.timeLeftInSeconds === 0) {