Make sure the RHS does not get focused when coming back from suppressed (#26816)

* Make sure the RHS does not get focused when coming back from suppressed

* Fix missing line break

* fix tests
Этот коммит содержится в:
Daniel Espino García
2024-04-22 12:42:54 +02:00
коммит произвёл GitHub
родитель d0a67cd84a
Коммит 4b934d2a62
21 изменённых файлов: 57 добавлений и 167 удалений

Просмотреть файл

@@ -175,10 +175,6 @@ export function getPostDraft(state: GlobalState, prefixId: string, suffixId: str
return defaultDraft;
}
export function getIsRhsSuppressed(state: GlobalState): boolean {
return state.views.rhsSuppressed;
}
export function getIsRhsOpen(state: GlobalState): boolean {
return state.views.rhs.isSidebarOpen && !state.views.rhsSuppressed;
}

8
webapp/channels/src/selectors/views/rhs.ts Обычный файл
Просмотреть файл

@@ -0,0 +1,8 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import type {GlobalState} from 'types/store';
export function getShouldFocusRHS(state: GlobalState): boolean {
return state.views.rhs.shouldFocusRHS;
}