mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
TimerView: Update only as often as 500ms
FREEBIE
This commit is contained in:
@@ -41,8 +41,8 @@
|
||||
var remainingTime = this.model.msTilExpire();
|
||||
var elapsed = (totalTime - remainingTime) / totalTime;
|
||||
this.$('.sand').css('transform', 'translateY(' + elapsed*100 + '%)');
|
||||
this.timeout = setTimeout(this.update.bind(this), totalTime / 100);
|
||||
this.$el.css('display', 'inline-block');
|
||||
this.timeout = setTimeout(this.update.bind(this), Math.max(totalTime / 100, 500));
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user