mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-15 11:41:30 +03:00
Replicate same behaviour for the home space
This commit is contained in:
parent
d3fc047b58
commit
49b61d512f
1 changed files with 3 additions and 3 deletions
|
@ -121,8 +121,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
*/
|
||||
public async setActiveSpace(space: Room | null, contextSwitch = true) {
|
||||
if (space && !space?.isSpaceRoom()) return;
|
||||
if (space && space === this.activeSpace) {
|
||||
const notificationState = this.getNotificationState(space.roomId);
|
||||
if (space === this.activeSpace) {
|
||||
const notificationState = this.getNotificationState(space ? space.roomId : HOME_SPACE);
|
||||
if (notificationState.count) {
|
||||
const roomId = notificationState.getRoomWithMaxNotifications();
|
||||
defaultDispatcher.dispatch({
|
||||
|
@ -132,7 +132,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
});
|
||||
}
|
||||
return;
|
||||
} else if (space === this.activeSpace) return;
|
||||
}
|
||||
|
||||
this._activeSpace = space;
|
||||
this.emit(UPDATE_SELECTED_SPACE, this.activeSpace);
|
||||
|
|
Loading…
Reference in a new issue