diff --git a/native/chat/chat-input-bar.react.js b/native/chat/chat-input-bar.react.js --- a/native/chat/chat-input-bar.react.js +++ b/native/chat/chat-input-bar.react.js @@ -911,19 +911,7 @@ saveExit(); return; } - Alert.alert( - 'Discard changes?', - 'You have unsaved changes. Are you sure to discard them and leave the ' + - 'screen?', - [ - { text: 'Don’t leave', style: 'cancel' }, - { - text: 'Discard edit', - style: 'destructive', - onPress: saveExit, - }, - ], - ); + exitEditAlert(saveExit); }; onPressJoin = () => { diff --git a/native/utils/edit-messages-utils.js b/native/utils/edit-messages-utils.js --- a/native/utils/edit-messages-utils.js +++ b/native/utils/edit-messages-utils.js @@ -13,19 +13,23 @@ } function exitEditAlert(onDiscard: () => void): void { - Alert.alert('Are you sure?', 'Your edits will be discarded.', [ - { - text: 'Continue editing', - style: 'cancel', - }, - { - text: 'Discard edit', - style: 'destructive', - onPress: () => { - onDiscard(); + Alert.alert( + 'Discard changes?', + 'You have unsaved changes which will be discarded if you navigate away.', + [ + { + text: 'Continue editing', + style: 'cancel', }, - }, - ]); + { + text: 'Discard edit', + style: 'destructive', + onPress: () => { + onDiscard(); + }, + }, + ], + ); } export { useShouldRenderEditButton, exitEditAlert };