ThreadSummaryElement: fix latest time

This commit is contained in:
Iris Lightshard 2024-07-04 23:49:51 -06:00
parent c03fbd7950
commit 2f2b596270
Signed by: Iris Lightshard
GPG key ID: 688407174966CAF3

View file

@ -69,8 +69,8 @@ export class ThreadSummaryElement extends HTMLElement {
} }
const l = parseInt(this.getAttribute("data-len") ?? "0"); const l = parseInt(this.getAttribute("data-len") ?? "0");
const latest = new Date(this.getAttribute("data-latest") ?? 0); const latest = this.getAttribute("data-latest") ;
const created = new Date(this.getAttribute("data-created")?? 0); const created = this.getAttribute("data-created");
const newness = this.getAttribute("data-new") ? true : false; const newness = this.getAttribute("data-new") ? true : false;
let metadataChanged = false; let metadataChanged = false;
@ -79,14 +79,14 @@ export class ThreadSummaryElement extends HTMLElement {
metadataChanged = true; metadataChanged = true;
this._len = l; this._len = l;
} }
if (created && created != this._created) { if (created && new Date(created) != this._created) {
metadataChanged = true; metadataChanged = true;
this._created = created; this._created = new Date(created);
this._latest = created; this._latest = this._created;
} }
if (latest && latest != this._latest) { if (latest && new Date(latest) != this._latest) {
metadataChanged = true; metadataChanged = true;
this._latest = latest; this._latest = new Date(latest);
} }
if (newness != this._new) { if (newness != this._new) {