diff --git a/src/view/com/composer/Composer.tsx b/src/view/com/composer/Composer.tsx index bc02167517..eaa775c1ed 100644 --- a/src/view/com/composer/Composer.tsx +++ b/src/view/com/composer/Composer.tsx @@ -845,7 +845,8 @@ export const ComposePost = ({ onSaveDraft={saveCurrentDraft} onDiscard={handleClearComposer} isEmpty={isComposerEmpty} - isDirty={composerState.isDirty}> + isDirty={composerState.isDirty} + isEditingDraft={!!composerState.draftId}> {missingAltError && } - Save draft?{' '} + {composerState.draftId ? ( + Save changes? + ) : ( + Save draft? + )} - {_(msg`You can save this draft to continue later.`)} + {composerState.draftId + ? _(msg`You have unsaved changes to this draft.`) + : _(msg`You can save this draft to continue later.`)} @@ -1142,6 +1153,7 @@ function ComposerTopBar({ onDiscard, isEmpty, isDirty, + isEditingDraft, topBarAnimatedStyle, children, }: { @@ -1158,6 +1170,7 @@ function ComposerTopBar({ onDiscard: () => void isEmpty: boolean isDirty: boolean + isEditingDraft: boolean topBarAnimatedStyle: StyleProp children?: React.ReactNode }) { @@ -1192,6 +1205,7 @@ function ComposerTopBar({ onDiscard={onDiscard} isEmpty={isEmpty} isDirty={isDirty} + isEditingDraft={isEditingDraft} /> )} {isPublishing ? ( diff --git a/src/view/com/composer/drafts/DraftsButton.tsx b/src/view/com/composer/drafts/DraftsButton.tsx index 3cf21d4200..9f3563b6e0 100644 --- a/src/view/com/composer/drafts/DraftsButton.tsx +++ b/src/view/com/composer/drafts/DraftsButton.tsx @@ -14,12 +14,14 @@ export function DraftsButton({ onDiscard, isEmpty, isDirty, + isEditingDraft, }: { onSelectDraft: (draft: DraftSummary) => void onSaveDraft: () => Promise onDiscard: () => void isEmpty: boolean isDirty: boolean + isEditingDraft: boolean }) { const {_} = useLingui() const draftsDialogControl = Dialog.useDialogControl() @@ -69,17 +71,27 @@ export function DraftsButton({ - Save current draft? + {isEditingDraft ? ( + Save changes? + ) : ( + Save draft? + )} - - You have unsaved changes. Would you like to save them before viewing - your drafts? - + {isEditingDraft ? ( + + You have unsaved changes. Would you like to save them before + viewing your drafts? + + ) : ( + + Would you like to save this as a draft before viewing your drafts? + + )}