1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-05 15:22:09 +03:00

Only show core navigation elements (call/chat/notification/info) when a widget is maximised (#7114)

Co-authored-by: J. Ryan Stinnett <jryans@gmail.com>
This commit is contained in:
Timo
2021-11-29 19:01:47 +01:00
committed by GitHub
parent fe24c8ad2a
commit 82ae39435c
4 changed files with 63 additions and 21 deletions

View File

@@ -43,6 +43,7 @@ import { _t } from '../../languageHandler';
import ThreadListContextMenu from '../views/context_menus/ThreadListContextMenu';
import RightPanelStore from '../../stores/RightPanelStore';
import SettingsStore from '../../settings/SettingsStore';
import { WidgetLayoutStore } from '../../stores/widgets/WidgetLayoutStore';
interface IProps {
room: Room;
@@ -209,6 +210,12 @@ export default class ThreadView extends React.Component<IProps, IState> {
if (!SettingsStore.getValue("feature_maximised_widgets")) {
previousPhase = RightPanelPhases.ThreadPanel;
}
// change the previous phase to the threadPanel in case there is no maximised widget anymore
if (!WidgetLayoutStore.instance.hasMaximisedWidget(this.props.room)) {
previousPhase = RightPanelPhases.ThreadPanel;
}
// Make sure the previous Phase is always one of the two: Timeline or ThreadPanel
if (![RightPanelPhases.ThreadPanel, RightPanelPhases.Timeline].includes(previousPhase)) {
previousPhase = RightPanelPhases.ThreadPanel;