Merge pull request #3735 from crazyserver/MOBILE-4283

MOBILE-4283 timer: Make timer unhiddable on 100 secs or less
main
Noel De Martin 2023-07-12 10:13:58 +02:00 committed by GitHub
commit 4eb3594d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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)) {