Skip to content

Commit

Permalink
Merge branch 'rm/359087' into 'master'
Browse files Browse the repository at this point in the history
remove polls when we are in a thread

See merge request kchat/webapp!908
  • Loading branch information
antonbuks committed Sep 3, 2024
2 parents 5b80152 + 0d401e5 commit 8a18eea
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,16 @@ class AdvancedCreateComment extends React.PureComponent<Props, State> {
);
});

const additionalControls = [];
if (!this.props.isThreadView) {
additionalControls.push(
<Poll
rootId={this.props.rootId}
key='poll'
disabled={this.props.shouldShowPreview}
/>);
}
additionalControls.push(...(pluginItems || []).filter(Boolean));
return (
<form onSubmit={this.handleSubmit}>
{
Expand Down Expand Up @@ -1174,14 +1184,7 @@ class AdvancedCreateComment extends React.PureComponent<Props, State> {
setDraftAsPostType={this.setDraftAsPostType}
isSchedulable={true}
handleSchedulePost={this.handleSchedulePost}
additionalControls={[
<Poll
rootId={this.props.rootId}
key='poll'
disabled={this.props.shouldShowPreview}
/>,
...(pluginItems || []),
].filter(Boolean)}
additionalControls={additionalControls}
codeBlockOnCtrlEnter={this.props.codeBlockOnCtrlEnter}
ctrlSend={this.props.ctrlSend}
loadNextMessage={this.loadNextMessage}
Expand Down

0 comments on commit 8a18eea

Please sign in to comment.