[FIX] Opening search field after server list does not hide server list (#4792)

* [FIX] Opening search field after server list does not hide server list

* minor tweak
This commit is contained in:
Reinaldo Neto 2023-01-06 12:36:23 -03:00 committed by GitHub
parent 8102bef1d0
commit 24ad69346a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -593,8 +593,11 @@ class RoomsListView extends React.Component<IRoomsListViewProps, IRoomsListViewS
initSearching = () => {
logEvent(events.RL_SEARCH);
const { dispatch } = this.props;
const { dispatch, showServerDropdown } = this.props;
this.internalSetState({ searching: true }, () => {
if (showServerDropdown) {
dispatch(closeServerDropdown());
}
dispatch(openSearchHeader());
this.handleSearch('');
this.setHeader();