mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Don't show toast if room is not available
This commit is contained in:
parent
072004a9c2
commit
903a157de2
@ -39,6 +39,9 @@ export class ToastCollectionViewModel extends ViewModel<SegmentType, Options> {
|
|||||||
onAdd(_, call: GroupCall) {
|
onAdd(_, call: GroupCall) {
|
||||||
if (this._shouldShowNotification(call)) {
|
if (this._shouldShowNotification(call)) {
|
||||||
const room = this._findRoomForCall(call);
|
const room = this._findRoomForCall(call);
|
||||||
|
if (!room) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
const dismiss = () => {
|
const dismiss = () => {
|
||||||
const idx = this.toastViewModels.array.findIndex(vm => vm.call === call);
|
const idx = this.toastViewModels.array.findIndex(vm => vm.call === call);
|
||||||
if (idx !== -1) {
|
if (idx !== -1) {
|
||||||
|
Loading…
Reference in New Issue
Block a user