You've already forked matrix-react-sdk
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user