all repos — underbbs @ 2f2b596270f00fabbc39fd1f7540154e038feec1

decentralized social media client

ThreadSummaryElement: fix latest time
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQT/foVVmI9pK13hPWFohAcXSWbK8wUCZoeJfwAKCRBohAcXSWbK
86obAQCUGKFflufpO0D9OjPjA/0uaMvlkd9jpPc2xBe4+cq1LAD+MsF8lL20+Bet
yqZz4Vwrtkq77PNW3UgFi8PhB/bJ7Qg=
=P3gO
-----END PGP SIGNATURE-----
commit

2f2b596270f00fabbc39fd1f7540154e038feec1

parent

c03fbd7950f214c640fa5f6dff520a136abc5ba7

1 files changed, 7 insertions(+), 7 deletions(-)

jump to
M ts/thread-summary-element.tsts/thread-summary-element.ts

@@ -69,8 +69,8 @@ }

} const l = parseInt(this.getAttribute("data-len") ?? "0"); - const latest = new Date(this.getAttribute("data-latest") ?? 0); - const created = new Date(this.getAttribute("data-created")?? 0); + const latest = this.getAttribute("data-latest") ; + const created = this.getAttribute("data-created"); const newness = this.getAttribute("data-new") ? true : false; let metadataChanged = false;

@@ -79,14 +79,14 @@ if (l && l != this._len) {

metadataChanged = true; this._len = l; } - if (created && created != this._created) { + if (created && new Date(created) != this._created) { metadataChanged = true; - this._created = created; - this._latest = created; + this._created = new Date(created); + this._latest = this._created; } - if (latest && latest != this._latest) { + if (latest && new Date(latest) != this._latest) { metadataChanged = true; - this._latest = latest; + this._latest = new Date(latest); } if (newness != this._new) {