Skip to content

Commit

Permalink
clean diff
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbuks committed Nov 7, 2024
1 parent 0fc8c74 commit f9e4eb6
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions webapp/channels/src/components/channel_header/channel_header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,6 @@ class ChannelHeader extends React.PureComponent<Props, State> {
hideGuestTags,
} = this.props;
const {formatMessage} = this.props.intl;
const isDirect = (channel.type === Constants.DM_CHANNEL);
const isGroup = (channel.type === Constants.GM_CHANNEL);
const isPrivate = (channel.type === Constants.PRIVATE_CHANNEL);

const channelNamesMap = channel.props && channel.props.channel_mentions;
const headerText = (isDirect && dmUser?.is_bot) ? dmUser.bot_description : channel.header;
const imageProps = {
hideUtilities: true,
};
const ariaLabelChannelHeader = this.props.intl.formatMessage({id: 'accessibility.sections.channelHeader', defaultMessage: 'channel header region'});
let showMeetBtn = !isEmptyObject(channelMember);

Expand Down Expand Up @@ -317,6 +308,12 @@ class ChannelHeader extends React.PureComponent<Props, State> {
);
}

const channelNamesMap = channel.props && channel.props.channel_mentions;

const isDirect = (channel.type === Constants.DM_CHANNEL);
const isGroup = (channel.type === Constants.GM_CHANNEL);
const isPrivate = (channel.type === Constants.PRIVATE_CHANNEL);

if (isGroup) {
if (hasGuests && !hideGuestTags) {
hasGuestsText = (
Expand Down Expand Up @@ -447,7 +444,11 @@ class ChannelHeader extends React.PureComponent<Props, State> {
}

let headerTextContainer;
const headerText = (isDirect && dmUser?.is_bot) ? dmUser.bot_description : channel.header;
if (headerText) {
const imageProps = {
hideUtilities: true,
};
const popoverContent = (
<Popover
id='header-popover'
Expand Down

0 comments on commit f9e4eb6

Please sign in to comment.