diff --git a/web/modals/threads/thread-settings-modal.react.js b/web/modals/threads/thread-settings-modal.react.js --- a/web/modals/threads/thread-settings-modal.react.js +++ b/web/modals/threads/thread-settings-modal.react.js @@ -106,6 +106,7 @@ +changeThreadSettingsAction: () => Promise, +onSubmit: (event: SyntheticEvent) => void, +buttons: ?React.Node, + +tabs: ?React.Node, }; class ThreadSettingsModal extends React.PureComponent { constructor(props: Props) { @@ -160,56 +161,9 @@ ); } - const tabs = [ - , - ]; - - // This UI needs to be updated to handle sidebars but we haven't gotten - // there yet. We'll probably end up ripping it out anyways, so for now we - // are just hiding the privacy tab for any thread that was created as a - // sidebar - const canSeePrivacyTab = - this.possiblyChangedValue('parentThreadID') && - threadInfo.sourceMessageID && - (threadInfo.type === threadTypes.COMMUNITY_OPEN_SUBTHREAD || - threadInfo.type === threadTypes.COMMUNITY_SECRET_SUBTHREAD); - - if (canSeePrivacyTab) { - tabs.push( - , - ); - } - const canDeleteThread = this.props.hasPermissionForTab( - threadInfo, - 'delete', - ); - if (canDeleteThread) { - tabs.push( - , - ); - } - return ( -
    {tabs}
+
    {this.props.tabs}
{mainContent} @@ -464,6 +418,51 @@ ); } + const tabs = [ + , + ]; + + // This UI needs to be updated to handle sidebars but we haven't gotten + // there yet. We'll probably end up ripping it out anyways, so for now we + // are just hiding the privacy tab for any thread that was created as a + // sidebar + const canSeePrivacyTab = + (queuedChanges['parentThreadID'] ?? threadInfo['parentThreadID']) && + threadInfo.sourceMessageID && + (threadInfo.type === threadTypes.COMMUNITY_OPEN_SUBTHREAD || + threadInfo.type === threadTypes.COMMUNITY_SECRET_SUBTHREAD); + + if (canSeePrivacyTab) { + tabs.push( + , + ); + } + + const canDeleteThread = hasPermissionForTab(threadInfo, 'delete'); + if (canDeleteThread) { + tabs.push( + , + ); + } + return ( ); },