Page MenuHomePhabricator

D3755.diff
No OneTemporary

D3755.diff

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

Mime Type
text/plain
Expires
Tue, Dec 3, 9:16 AM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2611153
Default Alt Text
D3755.diff (1 KB)

Event Timeline