disable saving drafts for replies (#9815)
This commit is contained in:
@@ -1141,41 +1141,57 @@ export const ComposePost = ({
|
|||||||
{!IS_WEBFooterSticky && footer}
|
{!IS_WEBFooterSticky && footer}
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Prompt.Outer control={discardPromptControl}>
|
{replyTo ? (
|
||||||
<Prompt.Content>
|
<Prompt.Basic
|
||||||
<Prompt.TitleText>
|
control={discardPromptControl}
|
||||||
{composerState.draftId ? (
|
title={_(msg`Discard draft?`)}
|
||||||
<Trans>Save changes?</Trans>
|
description=""
|
||||||
) : (
|
confirmButtonCta={_(msg`Discard`)}
|
||||||
<Trans>Save draft?</Trans>
|
confirmButtonColor="negative"
|
||||||
)}
|
onConfirm={handleDiscard}
|
||||||
</Prompt.TitleText>
|
/>
|
||||||
<Prompt.DescriptionText>
|
) : (
|
||||||
{composerState.draftId
|
<Prompt.Outer control={discardPromptControl}>
|
||||||
? _(
|
<Prompt.Content>
|
||||||
msg`You have unsaved changes to this draft, would you like to save them?`,
|
<Prompt.TitleText>
|
||||||
)
|
{composerState.draftId ? (
|
||||||
: _(msg`Would you like to save this as a draft to edit later?`)}
|
<Trans>Save changes?</Trans>
|
||||||
</Prompt.DescriptionText>
|
) : (
|
||||||
</Prompt.Content>
|
<Trans>Save draft?</Trans>
|
||||||
<Prompt.Actions>
|
)}
|
||||||
<Prompt.Action
|
</Prompt.TitleText>
|
||||||
cta={
|
<Prompt.DescriptionText>
|
||||||
composerState.draftId
|
{composerState.draftId ? (
|
||||||
? _(msg`Save changes`)
|
<Trans>
|
||||||
: _(msg`Save draft`)
|
You have unsaved changes to this draft, would you like to
|
||||||
}
|
save them?
|
||||||
onPress={handleSaveDraft}
|
</Trans>
|
||||||
color="primary"
|
) : (
|
||||||
/>
|
<Trans>
|
||||||
<Prompt.Action
|
Would you like to save this as a draft to edit later?
|
||||||
cta={_(msg`Discard`)}
|
</Trans>
|
||||||
onPress={handleDiscard}
|
)}
|
||||||
color="negative_subtle"
|
</Prompt.DescriptionText>
|
||||||
/>
|
</Prompt.Content>
|
||||||
<Prompt.Cancel />
|
<Prompt.Actions>
|
||||||
</Prompt.Actions>
|
<Prompt.Action
|
||||||
</Prompt.Outer>
|
cta={
|
||||||
|
composerState.draftId
|
||||||
|
? _(msg`Save changes`)
|
||||||
|
: _(msg`Save draft`)
|
||||||
|
}
|
||||||
|
onPress={handleSaveDraft}
|
||||||
|
color="primary"
|
||||||
|
/>
|
||||||
|
<Prompt.Action
|
||||||
|
cta={_(msg`Discard`)}
|
||||||
|
onPress={handleDiscard}
|
||||||
|
color="negative_subtle"
|
||||||
|
/>
|
||||||
|
<Prompt.Cancel />
|
||||||
|
</Prompt.Actions>
|
||||||
|
</Prompt.Outer>
|
||||||
|
)}
|
||||||
</KeyboardAvoidingView>
|
</KeyboardAvoidingView>
|
||||||
</BottomSheetPortalProvider>
|
</BottomSheetPortalProvider>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user