Draft previews (#9803)

* Send deviceId and platform

* Add deviceId and deviceName to drafts, skip loading media for other devies

* WIP new preview

* show rich text in drafts list

(cherry picked from commit fb70d53d59)

* New draft preview UI

* Tighten up spacing in draft list

* Add i18n comments

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
Eric Bailey
2026-01-30 17:00:54 -06:00
committed by GitHub
parent 45d6e50eb4
commit 748706daab
11 changed files with 407 additions and 224 deletions
+2 -2
View File
@@ -138,7 +138,7 @@ import {
type RestoredVideo,
} from './drafts/state/api'
import {
loadDraft,
loadDraftMedia,
useCleanupPublishedDraftMutation,
useSaveDraftMutation,
} from './drafts/state/queries'
@@ -482,7 +482,7 @@ export const ComposePost = ({
})
// Load local media files for the draft
const {loadedMedia} = await loadDraft(draftSummary.draft)
const {loadedMedia} = await loadDraftMedia(draftSummary.draft)
// Extract original localRefs for orphan detection on save
const originalLocalRefs = extractLocalRefs(draftSummary.draft)