@@ -19,8 +19,6 @@ import { createRef } from "react";
1919import classNames from "classnames" ;
2020import { Room } from "matrix-js-sdk/src/models/room" ;
2121
22- import GroupFilterPanel from "./GroupFilterPanel" ;
23- import CustomRoomTagPanel from "./CustomRoomTagPanel" ;
2422import dis from "../../dispatcher/dispatcher" ;
2523import { _t } from "../../languageHandler" ;
2624import RoomList from "../views/rooms/RoomList" ;
@@ -33,7 +31,6 @@ import RoomBreadcrumbs from "../views/rooms/RoomBreadcrumbs";
3331import { BreadcrumbsStore } from "../../stores/BreadcrumbsStore" ;
3432import { UPDATE_EVENT } from "../../stores/AsyncStore" ;
3533import ResizeNotifier from "../../utils/ResizeNotifier" ;
36- import SettingsStore from "../../settings/SettingsStore" ;
3734import RoomListStore , { LISTS_UPDATE_EVENT } from "../../stores/room-list/RoomListStore" ;
3835import IndicatorScrollbar from "../structures/IndicatorScrollbar" ;
3936import AccessibleTooltipButton from "../views/elements/AccessibleTooltipButton" ;
@@ -51,7 +48,6 @@ interface IProps {
5148
5249interface IState {
5350 showBreadcrumbs : boolean ;
54- showGroupFilterPanel : boolean ;
5551 activeSpace ?: Room ;
5652}
5753
@@ -68,9 +64,6 @@ const cssClasses = [
6864export default class LeftPanel extends React . Component < IProps , IState > {
6965 private ref : React . RefObject < HTMLDivElement > = createRef ( ) ;
7066 private listContainerRef : React . RefObject < HTMLDivElement > = createRef ( ) ;
71- private groupFilterPanelWatcherRef : string ;
72- private groupFilterPanelContainer = createRef < HTMLDivElement > ( ) ;
73- private bgImageWatcherRef : string ;
7467 private focusedElement = null ;
7568 private isDoingStickyHeaders = false ;
7669
@@ -79,33 +72,24 @@ export default class LeftPanel extends React.Component<IProps, IState> {
7972
8073 this . state = {
8174 showBreadcrumbs : BreadcrumbsStore . instance . visible ,
82- showGroupFilterPanel : SettingsStore . getValue ( 'TagPanel.enableTagPanel' ) ,
8375 activeSpace : SpaceStore . instance . activeSpace ,
8476 } ;
8577
8678 BreadcrumbsStore . instance . on ( UPDATE_EVENT , this . onBreadcrumbsUpdate ) ;
8779 RoomListStore . instance . on ( LISTS_UPDATE_EVENT , this . onBreadcrumbsUpdate ) ;
8880 SpaceStore . instance . on ( UPDATE_SELECTED_SPACE , this . updateActiveSpace ) ;
89- this . groupFilterPanelWatcherRef = SettingsStore . watchSetting ( "TagPanel.enableTagPanel" , null , ( ) => {
90- this . setState ( { showGroupFilterPanel : SettingsStore . getValue ( "TagPanel.enableTagPanel" ) } ) ;
91- } ) ;
9281 }
9382
9483 public componentDidMount ( ) {
9584 UIStore . instance . trackElementDimensions ( "LeftPanel" , this . ref . current ) ;
9685 UIStore . instance . trackElementDimensions ( "ListContainer" , this . listContainerRef . current ) ;
97- if ( this . groupFilterPanelContainer . current ) {
98- const componentName = "GroupFilterPanelContainer" ;
99- UIStore . instance . trackElementDimensions ( componentName , this . groupFilterPanelContainer . current ) ;
100- }
10186 UIStore . instance . on ( "ListContainer" , this . refreshStickyHeaders ) ;
10287 // Using the passive option to not block the main thread
10388 // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#improving_scrolling_performance_with_passive_listeners
10489 this . listContainerRef . current ?. addEventListener ( "scroll" , this . onScroll , { passive : true } ) ;
10590 }
10691
10792 public componentWillUnmount ( ) {
108- SettingsStore . unwatchSetting ( this . groupFilterPanelWatcherRef ) ;
10993 BreadcrumbsStore . instance . off ( UPDATE_EVENT , this . onBreadcrumbsUpdate ) ;
11094 RoomListStore . instance . off ( LISTS_UPDATE_EVENT , this . onBreadcrumbsUpdate ) ;
11195 SpaceStore . instance . off ( UPDATE_SELECTED_SPACE , this . updateActiveSpace ) ;
@@ -422,16 +406,6 @@ export default class LeftPanel extends React.Component<IProps, IState> {
422406 }
423407
424408 public render ( ) : React . ReactNode {
425- let leftLeftPanel ;
426- if ( this . state . showGroupFilterPanel ) {
427- leftLeftPanel = (
428- < div className = "mx_LeftPanel_GroupFilterPanelContainer" ref = { this . groupFilterPanelContainer } >
429- < GroupFilterPanel />
430- { SettingsStore . getValue ( "feature_custom_tags" ) ? < CustomRoomTagPanel /> : null }
431- </ div >
432- ) ;
433- }
434-
435409 const roomList = < RoomList
436410 onKeyDown = { this . onKeyDown }
437411 resizeNotifier = { this . props . resizeNotifier }
@@ -455,7 +429,6 @@ export default class LeftPanel extends React.Component<IProps, IState> {
455429
456430 return (
457431 < div className = { containerClasses } ref = { this . ref } >
458- { leftLeftPanel }
459432 < aside className = "mx_LeftPanel_roomListContainer" >
460433 { this . renderHeader ( ) }
461434 { this . renderSearchDialExplore ( ) }
0 commit comments