Story Toggler: Hide stories when search field is focused (#5583)
This commit is contained in:
parent
37617b4b8e
commit
92bb456d95
@ -192,11 +192,11 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
|||||||
lockScreen();
|
lockScreen();
|
||||||
});
|
});
|
||||||
|
|
||||||
const isSearchFocused = !isMessageListOpen && (
|
const isSearchRelevant = Boolean(globalSearchChatId)
|
||||||
Boolean(globalSearchChatId)
|
|
||||||
|| content === LeftColumnContent.GlobalSearch
|
|| content === LeftColumnContent.GlobalSearch
|
||||||
|| content === LeftColumnContent.Contacts
|
|| content === LeftColumnContent.Contacts;
|
||||||
);
|
|
||||||
|
const isSearchFocused = isMobile ? !isMessageListOpen && isSearchRelevant : isSearchRelevant;
|
||||||
|
|
||||||
useEffect(() => (isSearchFocused ? captureEscKeyListener(() => onReset()) : undefined), [isSearchFocused, onReset]);
|
useEffect(() => (isSearchFocused ? captureEscKeyListener(() => onReset()) : undefined), [isSearchFocused, onReset]);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user