mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-16 01:21:37 +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) {
|
public async setActiveSpace(space: Room | null, contextSwitch = true) {
|
||||||
if (space && !space?.isSpaceRoom()) return;
|
if (space && !space?.isSpaceRoom()) return;
|
||||||
if (space && space === this.activeSpace) {
|
if (space === this.activeSpace) {
|
||||||
const notificationState = this.getNotificationState(space.roomId);
|
const notificationState = this.getNotificationState(space ? space.roomId : HOME_SPACE);
|
||||||
if (notificationState.count) {
|
if (notificationState.count) {
|
||||||
const roomId = notificationState.getRoomWithMaxNotifications();
|
const roomId = notificationState.getRoomWithMaxNotifications();
|
||||||
defaultDispatcher.dispatch({
|
defaultDispatcher.dispatch({
|
||||||
|
@ -132,7 +132,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else if (space === this.activeSpace) return;
|
}
|
||||||
|
|
||||||
this._activeSpace = space;
|
this._activeSpace = space;
|
||||||
this.emit(UPDATE_SELECTED_SPACE, this.activeSpace);
|
this.emit(UPDATE_SELECTED_SPACE, this.activeSpace);
|
||||||
|
|
Loading…
Reference in a new issue