Stories: Hide stories when opening search (#5548)

This commit is contained in:
Alexander Zinchuk 2025-02-13 14:27:40 +01:00
parent dffbd96001
commit a90522f7f9

View File

@ -117,7 +117,7 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
const oldLang = useOldLang();
const lang = useLang();
const { isMobile, isDesktop } = useAppLayout();
const { isMobile } = useAppLayout();
const [isBotMenuOpen, markBotMenuOpen, unmarkBotMenuOpen] = useFlag();
@ -192,7 +192,7 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
lockScreen();
});
const isSearchFocused = (!isDesktop && !isMessageListOpen) && (
const isSearchFocused = !isMessageListOpen && (
Boolean(globalSearchChatId)
|| content === LeftColumnContent.GlobalSearch
|| content === LeftColumnContent.Contacts
@ -218,7 +218,8 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
const headerRef = useRef<HTMLDivElement>(null);
useElectronDrag(headerRef);
const withStoryToggler = !isSearchFocused && !selectedSearchDate && !globalSearchChatId && !areContactsVisible;
const withStoryToggler = !isSearchFocused
&& !selectedSearchDate && !globalSearchChatId && !areContactsVisible;
const searchContent = useMemo(() => {
return (