mirror of
https://github.com/flarum/framework.git
synced 2024-11-28 20:16:08 +08:00
Better live timestamp performance
This commit is contained in:
parent
b6efee1f1e
commit
fc788756d2
|
@ -28,6 +28,9 @@ export default {
|
|||
.removeData('livestamp');
|
||||
|
||||
timestamp = moment(timestamp);
|
||||
if (timestamp.diff(moment()) < 60 * 60) {
|
||||
return;
|
||||
}
|
||||
if (moment.isMoment(timestamp) && !isNaN(+timestamp)) {
|
||||
var newData = $.extend({ }, { 'original': $el.contents() }, oldData);
|
||||
newData.moment = moment(timestamp);
|
||||
|
|
Loading…
Reference in New Issue
Block a user