Page MenuHomePhabricator

D7680.diff
No OneTemporary

D7680.diff

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 };

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 2:16 PM (2 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611959
Default Alt Text
D7680.diff (1 KB)

Event Timeline