Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3382121
D7588.id25619.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
D7588.id25619.diff
View Options
diff --git a/native/chat/settings/thread-settings-name.react.js b/native/chat/settings/thread-settings-name.react.js
--- a/native/chat/settings/thread-settings-name.react.js
+++ b/native/chat/settings/thread-settings-name.react.js
@@ -67,6 +67,28 @@
);
}
+ renderButton() {
+ if (this.props.loadingStatus === 'loading') {
+ return (
+ <ActivityIndicator
+ size="small"
+ color={this.props.colors.panelForegroundSecondaryLabel}
+ />
+ );
+ } else if (
+ this.props.nameEditValue === null ||
+ this.props.nameEditValue === undefined
+ ) {
+ return (
+ <EditSettingButton
+ onPress={this.onPressEdit}
+ canChangeSettings={this.props.canChangeSettings}
+ />
+ );
+ }
+ return <SaveSettingButton onPress={this.onSubmit} />;
+ }
+
renderContent() {
if (
this.props.nameEditValue === null ||
@@ -77,26 +99,11 @@
<SingleLine style={this.props.styles.currentValue}>
{this.props.threadInfo.uiName}
</SingleLine>
- <EditSettingButton
- onPress={this.onPressEdit}
- canChangeSettings={this.props.canChangeSettings}
- />
+ {this.renderButton()}
</React.Fragment>
);
}
- let button;
- if (this.props.loadingStatus !== 'loading') {
- button = <SaveSettingButton onPress={this.onSubmit} />;
- } else {
- button = (
- <ActivityIndicator
- size="small"
- color={this.props.colors.panelForegroundSecondaryLabel}
- />
- );
- }
-
return (
<React.Fragment>
<TextInput
@@ -111,7 +118,7 @@
selectionColor={`#${this.props.threadInfo.color}`}
maxLength={chatNameMaxLength}
/>
- {button}
+ {this.renderButton()}
</React.Fragment>
);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 8:38 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2596446
Default Alt Text
D7588.id25619.diff (1 KB)
Attached To
Mode
D7588: [native] fix rendering of edit thread name settings button
Attached
Detach File
Event Timeline
Log In to Comment