diff --git a/native/chat/settings/thread-settings-description.react.js b/native/chat/settings/thread-settings-description.react.js
--- a/native/chat/settings/thread-settings-description.react.js
+++ b/native/chat/settings/thread-settings-description.react.js
@@ -74,17 +74,6 @@
this.props.descriptionEditValue !== null &&
this.props.descriptionEditValue !== undefined
) {
- let button;
- if (this.props.loadingStatus !== 'loading') {
- button = ;
- } else {
- button = (
-
- );
- }
const textInputStyle = {};
if (
this.props.descriptionTextHeight !== undefined &&
@@ -109,7 +98,7 @@
ref={this.textInputRef}
selectionColor={`#${this.props.threadInfo.color}`}
/>
- {button}
+ {this.renderButton()}
@@ -124,11 +113,7 @@
{this.props.threadInfo.description}
-
+ {this.renderButton()}
@@ -170,6 +155,28 @@
return null;
}
+ renderButton() {
+ if (this.props.loadingStatus === 'loading') {
+ return (
+
+ );
+ } else if (
+ this.props.descriptionEditValue === null ||
+ this.props.descriptionEditValue === undefined
+ ) {
+ return (
+
+ );
+ }
+ return ;
+ }
+
textInputRef = (textInput: ?React.ElementRef) => {
this.textInput = textInput;
};