Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3404637
D8022.id27242.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8022.id27242.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 4, 12:07 PM (10 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2614180
Default Alt Text
D8022.id27242.diff (1 KB)
Attached To
Mode
D8022: [native] Use Alert from old useSaveThreadAvatar in new setThreadAvatar
Attached
Detach File
Event Timeline
Log In to Comment