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 ( + + ); + } else if ( + this.props.nameEditValue === null || + this.props.nameEditValue === undefined + ) { + return ( + + ); + } + return ; + } + renderContent() { if ( this.props.nameEditValue === null || @@ -77,26 +99,11 @@ {this.props.threadInfo.uiName} - + {this.renderButton()} ); } - let button; - if (this.props.loadingStatus !== 'loading') { - button = ; - } else { - button = ( - - ); - } - return ( - {button} + {this.renderButton()} ); }