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