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