@@ -40,13 +40,17 @@ const QuickSettingsButton: React.FC<{
40
40
41
41
const currentRoomId = SdkContextClass . instance . roomViewStore . getRoomId ( ) ;
42
42
const developerModeEnabled = useSettingValue ( "developerMode" ) ;
43
+ // "Favourites" and "People" meta spaces are not available in the new room list
44
+ const newRoomListEnabled = useSettingValue ( "feature_new_room_list" ) ;
43
45
44
46
let contextMenu : JSX . Element | undefined ;
45
47
if ( menuDisplayed && handle . current ) {
46
48
contextMenu = (
47
49
< ContextMenu
48
50
{ ...alwaysAboveRightOf ( handle . current . getBoundingClientRect ( ) , ChevronFace . None , 16 ) }
49
- wrapperClassName = "mx_QuickSettingsButton_ContextMenuWrapper"
51
+ wrapperClassName = { classNames ( "mx_QuickSettingsButton_ContextMenuWrapper" , {
52
+ mx_QuickSettingsButton_ContextMenuWrapper_new_room_list : newRoomListEnabled ,
53
+ } ) }
50
54
onFinished = { closeMenu }
51
55
managed = { false }
52
56
focusLock = { true }
@@ -81,41 +85,50 @@ const QuickSettingsButton: React.FC<{
81
85
</ AccessibleButton >
82
86
) }
83
87
84
- < h4 className = "mx_QuickSettingsButton_pinToSidebarHeading" >
85
- < PinUprightIcon className = "mx_QuickSettingsButton_icon" />
86
- { _t ( "quick_settings|metaspace_section" ) }
87
- </ h4 >
88
-
89
- < StyledCheckbox
90
- className = "mx_QuickSettingsButton_favouritesCheckbox"
91
- checked = { ! ! favouritesEnabled }
92
- onChange = { onMetaSpaceChangeFactory ( MetaSpace . Favourites , "WebQuickSettingsPinToSidebarCheckbox" ) }
93
- >
94
- < FavouriteSolidIcon className = "mx_QuickSettingsButton_icon" />
95
- { _t ( "common|favourites" ) }
96
- </ StyledCheckbox >
97
- < StyledCheckbox
98
- className = "mx_QuickSettingsButton_peopleCheckbox"
99
- checked = { ! ! peopleEnabled }
100
- onChange = { onMetaSpaceChangeFactory ( MetaSpace . People , "WebQuickSettingsPinToSidebarCheckbox" ) }
101
- >
102
- < UserProfileSolidIcon className = "mx_QuickSettingsButton_icon" />
103
- { _t ( "common|people" ) }
104
- </ StyledCheckbox >
105
- < AccessibleButton
106
- className = "mx_QuickSettingsButton_moreOptionsButton"
107
- onClick = { ( ) => {
108
- closeMenu ( ) ;
109
- defaultDispatcher . dispatch ( {
110
- action : Action . ViewUserSettings ,
111
- initialTabId : UserTab . Sidebar ,
112
- } ) ;
113
- } }
114
- >
115
- < OverflowHorizontalIcon className = "mx_QuickSettingsButton_icon" />
116
- { _t ( "quick_settings|sidebar_settings" ) }
117
- </ AccessibleButton >
88
+ { ! newRoomListEnabled && (
89
+ < >
90
+ < h4 className = "mx_QuickSettingsButton_pinToSidebarHeading" >
91
+ < PinUprightIcon className = "mx_QuickSettingsButton_icon" />
92
+ { _t ( "quick_settings|metaspace_section" ) }
93
+ </ h4 >
118
94
95
+ < StyledCheckbox
96
+ className = "mx_QuickSettingsButton_favouritesCheckbox"
97
+ checked = { ! ! favouritesEnabled }
98
+ onChange = { onMetaSpaceChangeFactory (
99
+ MetaSpace . Favourites ,
100
+ "WebQuickSettingsPinToSidebarCheckbox" ,
101
+ ) }
102
+ >
103
+ < FavouriteSolidIcon className = "mx_QuickSettingsButton_icon" />
104
+ { _t ( "common|favourites" ) }
105
+ </ StyledCheckbox >
106
+ < StyledCheckbox
107
+ className = "mx_QuickSettingsButton_peopleCheckbox"
108
+ checked = { ! ! peopleEnabled }
109
+ onChange = { onMetaSpaceChangeFactory (
110
+ MetaSpace . People ,
111
+ "WebQuickSettingsPinToSidebarCheckbox" ,
112
+ ) }
113
+ >
114
+ < UserProfileSolidIcon className = "mx_QuickSettingsButton_icon" />
115
+ { _t ( "common|people" ) }
116
+ </ StyledCheckbox >
117
+ < AccessibleButton
118
+ className = "mx_QuickSettingsButton_moreOptionsButton"
119
+ onClick = { ( ) => {
120
+ closeMenu ( ) ;
121
+ defaultDispatcher . dispatch ( {
122
+ action : Action . ViewUserSettings ,
123
+ initialTabId : UserTab . Sidebar ,
124
+ } ) ;
125
+ } }
126
+ >
127
+ < OverflowHorizontalIcon className = "mx_QuickSettingsButton_icon" />
128
+ { _t ( "quick_settings|sidebar_settings" ) }
129
+ </ AccessibleButton >
130
+ </ >
131
+ ) }
119
132
< QuickThemeSwitcher requestClose = { closeMenu } />
120
133
</ ContextMenu >
121
134
) ;
0 commit comments