diff --git a/frontend/src/components/Messages.svelte b/frontend/src/components/Messages.svelte index 2a2edad..a2b3974 100644 --- a/frontend/src/components/Messages.svelte +++ b/frontend/src/components/Messages.svelte @@ -84,9 +84,9 @@
{#each $messages as message (message.id)} - {#if message._showDateMarkerAbove} + {#if message._aboveDateMarker}
- { new Intl.DateTimeFormat(getItem("ui:locale"), { month: "long", day: "numeric", year: "numeric" }).format(message._createdAtDate) } + { message._aboveDateMarker }
{/if} diff --git a/frontend/src/stores.js b/frontend/src/stores.js index 4523f0a..63e3136 100644 --- a/frontend/src/stores.js +++ b/frontend/src/stores.js @@ -152,7 +152,7 @@ class MessageStore extends Store { message._mentions = false; message._editable = false; message._clumped = false; - message._showDateMarkerAbove = false; + message._aboveDateMarker = null; if (userInfoStore.value && message.content.includes("@" + userInfoStore.value.username)) { message._mentions = true; } @@ -163,7 +163,7 @@ class MessageStore extends Store { message._clumped = true; } if (previous && (previous._createdAtDateString !== message._createdAtDateString)) { - message._showDateMarkerAbove = true; + message._aboveDateMarker = new Intl.DateTimeFormat(getItem("ui:locale"), { month: "long", day: "numeric", year: "numeric" }).format(message._createdAtDate); } return message; }