Stories: Hide stories when opening search (#5548)
This commit is contained in:
parent
dffbd96001
commit
a90522f7f9
@ -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 (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user