Page MenuHomePhabricator

D8022.id27238.diff
No OneTemporary

D8022.id27238.diff

diff --git a/native/avatars/edit-thread-avatar-provider.react.js b/native/avatars/edit-thread-avatar-provider.react.js
--- a/native/avatars/edit-thread-avatar-provider.react.js
+++ b/native/avatars/edit-thread-avatar-provider.react.js
@@ -44,6 +44,14 @@
const EditThreadAvatarContext: React.Context<?EditThreadAvatarContextType> =
React.createContext<?EditThreadAvatarContextType>();
+const failureAlert = () =>
+ Alert.alert(
+ 'Couldn’t save avatar',
+ 'Please try again later',
+ [{ text: 'OK' }],
+ { cancelable: true },
+ );
+
type Props = {
+children: React.Node,
};
@@ -116,7 +124,7 @@
try {
return await changeThreadSettingsCall(updateThreadRequest);
} catch (e) {
- Alert.alert('Avatar update failed', 'Unable to update avatar.');
+ failureAlert();
throw e;
}
})(),
@@ -157,7 +165,7 @@
try {
return await changeThreadSettingsCall(updateThreadRequest);
} catch (e) {
- Alert.alert('Avatar update failed', 'Unable to update avatar.');
+ failureAlert();
throw e;
}
})();

File Metadata

Mime Type
text/plain
Expires
Wed, Dec 4, 11:51 AM (10 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2614180
Default Alt Text
D8022.id27238.diff (1 KB)

Event Timeline