pl-fe: draft statuses display improvements

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-08-24 23:57:53 +02:00
parent 7039f36406
commit 6770818303
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ const buildStatus = (state: RootState, draftStatus: DraftStatus) => {
in_reply_to_id: draftStatus.in_reply_to,
media_attachments: draftStatus.media_attachments,
poll: buildPoll(draftStatus),
quote: draftStatus.quote,
quote_id: draftStatus.quote,
sensitive: draftStatus.sensitive,
spoiler_text: draftStatus.spoiler_text,
uri: `/draft_statuses/${draftStatus.draft_id}`,

View File

@ -11,6 +11,7 @@ import { useSettingsStore } from 'pl-fe/stores/settings';
import type { Status as StatusEntity } from 'pl-fe/normalizers/status';
import type { DraftStatus } from 'pl-fe/reducers/draft-statuses';
import { fetchStatus } from 'pl-fe/actions/statuses';
const messages = defineMessages({
deleteConfirm: { id: 'confirmations.draft_status_delete.confirm', defaultMessage: 'Discard' },
@ -45,6 +46,7 @@ const DraftStatusActionBar: React.FC<IDraftStatusActionBar> = ({ source, status
};
const handleEditClick = () => {
if (status.in_reply_to_id) dispatch(fetchStatus(status.in_reply_to_id));
dispatch(setComposeToStatus(status, status.poll, source.text, source.spoiler_text, source.content_type, false, source.draft_id, source.editorState));
openModal('COMPOSE');
};