{isMobile ? (
) : (
)}
{leftContent ? (
leftContent
) : channel ? (
isMobile ? (
) : isDM && recipient ? (
) : isGroupDM ? (
isMobile ? (
{groupDMName}
) : (
{
if (event.key === 'Enter' || event.key === ' ') {
event.preventDefault();
handleOpenEditGroup();
}
}}
>
)
) : isPersonalNotes ? (
{ChannelUtils.getIcon(channel, {className: styles.channelIcon})}
{channelName}
) : (
// biome-ignore lint/a11y/noStaticElementInteractions: Context menu requires onContextMenu handler on this container
{ChannelUtils.getIcon(channel, {className: styles.channelIcon})}
{channelName}
{channel.topic && (
<>
•
ModalActionCreators.push(modal(() => ))
}
onKeyDown={(e) =>
e.key === 'Enter' &&
ModalActionCreators.push(modal(() => ))
}
tabIndex={0}
>
>
)}
)
) : null}
{isMobile && channel && !isPersonalNotes && AccessibilityStore.showFavorites && (
)}
{isMobile && (isDM || isGroupDM) && !isPersonalNotes && (
<>
>
)}
{isMobile && isGuildChannel && (
)}
{channel && !isMobile && !isPersonalNotes && AccessibilityStore.showFavorites && (
)}
{channel && isGuildChannel && !isMobile && !isVoiceChannel && !isPersonalNotes && (
)}
{showPins && channel && !isMobile &&
}
{(isDM || isGroupDM) && channel && !isMobile && !(isDM && isBotDMRecipient) && (
<>
>
)}
{shouldShowCreateGroupButton && (
)}
{shouldShowAddFriendsButton && (
)}
{showMembersToggle && !isMobile && (
)}
{!isMobile && channel && !isVoiceChannel && (
{
setSearchQuery(query);
setSearchSegments(segments);
latestSearchQueryRef.current = query;
latestSearchSegmentsRef.current = segments;
}}
onSearch={() => {
const q = latestSearchQueryRef.current;
if (q.trim()) {
onSearchSubmit?.(q, latestSearchSegmentsRef.current);
}
}}
onClear={() => {
setSearchQuery('');
setSearchSegments([]);
latestSearchQueryRef.current = '';
latestSearchSegmentsRef.current = [];
onSearchClose?.();
}}
isResultsOpen={Boolean(isSearchResultsOpen)}
onCloseResults={() => onSearchClose?.()}
inputRefExternal={searchInputRef}
/>
)}
{!isMobile &&
}
{!isMobile &&
}