Page MenuHomePhabricator

D8019.diff
No OneTemporary

D8019.diff

diff --git a/native/avatars/edit-user-avatar-provider.react.js b/native/avatars/edit-user-avatar-provider.react.js
--- a/native/avatars/edit-user-avatar-provider.react.js
+++ b/native/avatars/edit-user-avatar-provider.react.js
@@ -33,6 +33,14 @@
updateUserAvatarActionTypes,
);
+const displayFailureAlert = () =>
+ Alert.alert(
+ 'Couldn’t save avatar',
+ 'Please try again later',
+ [{ text: 'OK' }],
+ { cancelable: true },
+ );
+
type Props = {
+children: React.Node,
};
@@ -72,7 +80,7 @@
try {
return await updateUserAvatarCall(imageAvatarUpdateRequest);
} catch (e) {
- Alert.alert('Avatar update failed', 'Unable to update avatar.');
+ displayFailureAlert();
throw e;
}
})(),
@@ -95,7 +103,7 @@
try {
return await updateUserAvatarCall(avatarRequest);
} catch (e) {
- Alert.alert('Avatar update failed', 'Unable to update avatar.');
+ displayFailureAlert();
throw e;
}
})();

File Metadata

Mime Type
text/plain
Expires
Thu, Dec 5, 12:01 AM (12 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2615209
Default Alt Text
D8019.diff (1 KB)

Event Timeline