Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3401217
D3755.id11634.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
D3755.id11634.diff
View Options
diff --git a/native/chat/settings/thread-settings-promote-sidebar.react.js b/native/chat/settings/thread-settings-promote-sidebar.react.js
--- a/native/chat/settings/thread-settings-promote-sidebar.react.js
+++ b/native/chat/settings/thread-settings-promote-sidebar.react.js
@@ -23,6 +23,23 @@
+promoteSidebar: () => mixed,
};
class ThreadSettingsPromoteSidebar extends React.PureComponent<Props> {
+ onClick = () => {
+ Alert.alert(
+ 'Are you sure?',
+ "This promoting a sidebar to a full thread can't be undone.",
+ [
+ {
+ text: 'Cancel',
+ style: 'cancel',
+ },
+ {
+ text: 'Yes',
+ onPress: this.props.promoteSidebar,
+ },
+ ],
+ );
+ };
+
render() {
const {
panelIosHighlightUnderlay,
@@ -32,10 +49,11 @@
this.props.loadingStatus === 'loading' ? (
<ActivityIndicator size="small" color={panelForegroundSecondaryLabel} />
) : null;
+
return (
<View style={this.props.styles.container}>
<Button
- onPress={this.props.promoteSidebar}
+ onPress={this.onClick}
style={[this.props.styles.button, this.props.buttonStyle]}
iosFormat="highlight"
iosHighlightUnderlayColor={panelIosHighlightUnderlay}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 3, 11:00 AM (21 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611153
Default Alt Text
D3755.id11634.diff (1 KB)
Attached To
Mode
D3755: [native] [feature] [ENG-1016] add alert prompt to user, promote thread cant be undone
Attached
Detach File
Event Timeline
Log In to Comment