diff --git a/packages/session-ui/src/message/message-content.tsx b/packages/session-ui/src/message/message-content.tsx index 23816f28bf8..e880c6d9c6e 100644 --- a/packages/session-ui/src/message/message-content.tsx +++ b/packages/session-ui/src/message/message-content.tsx @@ -313,7 +313,8 @@ export function CurrentUserMessageDisplay(props: { }) // The menu names the day relatively: Today and Yesterday, then the date this year, then the date with its year. - const sent = createMemo(() => { + // A plain function, not a memo, so each menu open compares against the current day. + const sent = () => { const created = new Date(props.message.time.created) const now = new Date() const midnight = (date: Date) => new Date(date.getFullYear(), date.getMonth(), date.getDate()).getTime() @@ -335,7 +336,7 @@ export function CurrentUserMessageDisplay(props: { }).format(created) return new Intl.DateTimeFormat(i18n.locale(), { dateStyle: "medium", timeStyle: "short" }).format(created) - }) + } // A waiting steer reads agent · model · Pending; mobile shows the agent and model in the composer instead. const metaLabels = createMemo(() => (mobile() ? [] : [...agentItems(), ...modelItems(data, props.model)]))