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: nilix
GPG Key ID: 688407174966CAF3
1 changed files with 7 additions and 7 deletions

View File

@ -69,8 +69,8 @@ export class ThreadSummaryElement extends HTMLElement {
}
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 @@ export class ThreadSummaryElement extends HTMLElement {
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) {