From e74e02ac8ca38563bba183cc7033f01bd9d3c11c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Tue, 11 Jul 2023 17:52:18 +0200 Subject: [PATCH] MOBILE-4283 timer: Make timer unhiddable on 100 secs or less --- src/core/components/timer/timer.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/components/timer/timer.ts b/src/core/components/timer/timer.ts index f68ee10bd..9350fce02 100644 --- a/src/core/components/timer/timer.ts +++ b/src/core/components/timer/timer.ts @@ -73,6 +73,11 @@ export class CoreTimerComponent implements OnInit, OnDestroy { container = container || this.elementRef.nativeElement; this.timeLeft = Math.max(endTime - CoreTimeUtils.timestamp(), 0); + if (this.timeLeft <= 100) { + this.hiddable = false; + this.showTimeLeft = true; + } + if (container) { // Add class if timer is below timeLeftClassThreshold. if (this.timeLeft < this.timeLeftClassThreshold && !container.classList.contains(timeLeftClass + this.timeLeft)) {