feat: persist composer drafts in memory across navigation

This commit is contained in:
2026-04-04 16:52:22 +05:45
parent 70e5172f1b
commit a14bbd6a0a
12 changed files with 189 additions and 40 deletions
+2
View File
@@ -66,6 +66,7 @@
const {pubkeys, info}: Props = $props()
const chat = deriveChat(pubkeys)
const draftKey = `dm:${$chat?.id}`
const others = remove($pubkey!, pubkeys)
const missingRelayLists = $derived(others.filter(pk => !$messagingRelayListsByPubkey.has(pk)))
@@ -337,6 +338,7 @@
{onEscape}
{onEditPrevious}
content={eventToEdit?.content}
draftKey={eventToEdit ? undefined : draftKey}
disabled={Boolean(missingRelayLists.length)} />
{/key}
</div>