Merge pull request #3735 from crazyserver/MOBILE-4283
MOBILE-4283 timer: Make timer unhiddable on 100 secs or lessmain
commit
4eb3594d9b
|
@ -73,6 +73,11 @@ export class CoreTimerComponent implements OnInit, OnDestroy {
|
||||||
container = container || this.elementRef.nativeElement;
|
container = container || this.elementRef.nativeElement;
|
||||||
this.timeLeft = Math.max(endTime - CoreTimeUtils.timestamp(), 0);
|
this.timeLeft = Math.max(endTime - CoreTimeUtils.timestamp(), 0);
|
||||||
|
|
||||||
|
if (this.timeLeft <= 100) {
|
||||||
|
this.hiddable = false;
|
||||||
|
this.showTimeLeft = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (container) {
|
if (container) {
|
||||||
// Add class if timer is below timeLeftClassThreshold.
|
// Add class if timer is below timeLeftClassThreshold.
|
||||||
if (this.timeLeft < this.timeLeftClassThreshold && !container.classList.contains(timeLeftClass + this.timeLeft)) {
|
if (this.timeLeft < this.timeLeftClassThreshold && !container.classList.contains(timeLeftClass + this.timeLeft)) {
|
||||||
|
|
Loading…
Reference in New Issue