pl-fe: draft statuses display improvements
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -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}`,
|
||||
|
||||
@ -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');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user