@@ -1099,7 +1099,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
10991099
11001100 private leaveRoomWarnings ( roomId : string ) {
11011101 const roomToLeave = MatrixClientPeg . get ( ) . getRoom ( roomId ) ;
1102- const isSpace = SettingsStore . getValue ( "feature_spaces" ) && roomToLeave ?. isSpaceRoom ( ) ;
1102+ const isSpace = SpaceStore . spacesEnabled && roomToLeave ?. isSpaceRoom ( ) ;
11031103 // Show a warning if there are additional complications.
11041104 const warnings = [ ] ;
11051105
@@ -1137,7 +1137,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
11371137 const roomToLeave = MatrixClientPeg . get ( ) . getRoom ( roomId ) ;
11381138 const warnings = this . leaveRoomWarnings ( roomId ) ;
11391139
1140- const isSpace = SettingsStore . getValue ( "feature_spaces" ) && roomToLeave ?. isSpaceRoom ( ) ;
1140+ const isSpace = SpaceStore . spacesEnabled && roomToLeave ?. isSpaceRoom ( ) ;
11411141 Modal . createTrackedDialog ( isSpace ? "Leave space" : "Leave room" , '' , QuestionDialog , {
11421142 title : isSpace ? _t ( "Leave space" ) : _t ( "Leave room" ) ,
11431143 description : (
@@ -1687,7 +1687,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
16871687 const type = screen === "start_sso" ? "sso" : "cas" ;
16881688 PlatformPeg . get ( ) . startSingleSignOn ( cli , type , this . getFragmentAfterLogin ( ) ) ;
16891689 } else if ( screen === 'groups' ) {
1690- if ( SettingsStore . getValue ( "feature_spaces" ) ) {
1690+ if ( SpaceStore . spacesEnabled ) {
16911691 dis . dispatch ( { action : "view_home_page" } ) ;
16921692 return ;
16931693 }
@@ -1774,7 +1774,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
17741774 subAction : params . action ,
17751775 } ) ;
17761776 } else if ( screen . indexOf ( 'group/' ) === 0 ) {
1777- if ( SettingsStore . getValue ( "feature_spaces" ) ) {
1777+ if ( SpaceStore . spacesEnabled ) {
17781778 dis . dispatch ( { action : "view_home_page" } ) ;
17791779 return ;
17801780 }
0 commit comments