mirror of https://github.com/vector-im/riot-web
Send onNewInvitedRoom via VisibilityProvider
parent
d339dc447f
commit
89b2dae035
|
@ -426,12 +426,12 @@ export class RoomListStoreClass extends AsyncStoreWithClient<IState> {
|
||||||
this.roomHoldingPen.push(room);
|
this.roomHoldingPen.push(room);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
// we call straight out to VoipUserMapper here which is a bit of a hack: probably this
|
// Let the visibility provider know that there is a new invited room. It would be nice
|
||||||
// should be calling the visibility provider which in turn farms out to various visibility
|
// if this could just be an event that things listen for but the point of this is that
|
||||||
// providers? Anyway, the point of this is that we delay doing anything about this room
|
// we delay doing anything about this room until the VoipUserMapper had had a chance
|
||||||
// until the VoipUserMapper had had a chance to do the things it needs to do to decide
|
// to do the things it needs to do to decide if we should show this room or not, so
|
||||||
// if we should show this room or not.
|
// an even wouldn't et us do that.
|
||||||
await VoipUserMapper.sharedInstance().onNewInvitedRoom(room);
|
await VisibilityProvider.instance.onNewInvitedRoom(room);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,10 @@ export class VisibilityProvider {
|
||||||
return VisibilityProvider.internalInstance;
|
return VisibilityProvider.internalInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async onNewInvitedRoom(room: Room) {
|
||||||
|
await VoipUserMapper.sharedInstance().onNewInvitedRoom(room);
|
||||||
|
}
|
||||||
|
|
||||||
public isRoomVisible(room: Room): boolean {
|
public isRoomVisible(room: Room): boolean {
|
||||||
let isVisible = true; // Returned at the end of this function
|
let isVisible = true; // Returned at the end of this function
|
||||||
let forced = false; // When true, this function won't bother calling the customisation points
|
let forced = false; // When true, this function won't bother calling the customisation points
|
||||||
|
|
Loading…
Reference in New Issue