diff --git a/ROADMAP.md b/ROADMAP.md index ebc25c36..a1d3e27a 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,6 +1,5 @@ # Current -- [ ] formatTimestamp is expensive, cache it by assigning to events - [ ] Fix hover on notes in modal - [ ] Show loading/success on zap invoice screen - [ ] Fix iOS/safari/firefox @@ -36,6 +35,8 @@ # More +- [ ] Performance + - same deal as with formatTimestamp, don't use functions inline since svelte can't cache them - [ ] Image Uploads - [ ] Add LN invoices - [ ] Contact other client authors, self-hostable, or just use my instance diff --git a/src/views/notes/Note.svelte b/src/views/notes/Note.svelte index 2f1279b3..1abf669f 100644 --- a/src/views/notes/Note.svelte +++ b/src/views/notes/Note.svelte @@ -55,6 +55,7 @@ let showRelays = false const {profile} = user + const timestamp = formatTimestamp(note.created_at) const borderColor = invertColors ? "medium" : "dark" const links = extractUrls(note.content) const showEntire = anchorId === note.id @@ -358,7 +359,7 @@ href={"/" + nip19.neventEncode({id: note.id, relays: [note.seen_on]})} class="text-sm text-light" type="unstyled"> - {formatTimestamp(note.created_at)} + {timestamp}