1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-12-10 05:42:29 +03:00

Render mini user menu for when space panel is disabled (#7258)

This commit is contained in:
Michael Telatynski
2021-12-02 15:44:01 +00:00
committed by GitHub
parent d3c556bef7
commit 0a99be3d65
5 changed files with 23 additions and 5 deletions

View File

@@ -43,6 +43,7 @@ import { UPDATE_EVENT } from "../../stores/AsyncStore";
import IndicatorScrollbar from "./IndicatorScrollbar";
import RoomBreadcrumbs from "../views/rooms/RoomBreadcrumbs";
import SettingsStore from "../../settings/SettingsStore";
import UserMenu from "./UserMenu";
interface IProps {
isMinimized: boolean;
@@ -380,6 +381,7 @@ export default class LeftPanel extends React.Component<IProps, IState> {
onBlur={this.onBlur}
onKeyDown={this.onKeyDown}
>
{ !SpaceStore.spacesEnabled && <UserMenu isPanelCollapsed={true} /> }
<RoomSearch
isMinimized={this.props.isMinimized}
ref={this.roomSearchRef}
@@ -420,7 +422,12 @@ export default class LeftPanel extends React.Component<IProps, IState> {
<aside className="mx_LeftPanel_roomListContainer">
{ this.renderSearchDialExplore() }
{ this.renderBreadcrumbs() }
{ !this.props.isMinimized && <RoomListHeader onVisibilityChange={this.refreshStickyHeaders} /> }
{ !this.props.isMinimized && (
<RoomListHeader
onVisibilityChange={this.refreshStickyHeaders}
spacePanelDisabled={!SpaceStore.spacesEnabled}
/>
) }
<div className="mx_LeftPanel_roomListWrapper">
<div
className={roomListClasses}