MOBILE-4283 timer: Make timer unhiddable on 100 secs or less

main
Pau Ferrer Ocaña 2023-07-11 17:52:18 +02:00
parent 2c881793e9
commit e74e02ac8c
1 changed files with 5 additions and 0 deletions

View File

@ -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)) {