diff --git a/src/domain/session/toast/CallToastNotificationViewModel.ts b/src/domain/session/toast/CallToastNotificationViewModel.ts index 3281b86a..5c788334 100644 --- a/src/domain/session/toast/CallToastNotificationViewModel.ts +++ b/src/domain/session/toast/CallToastNotificationViewModel.ts @@ -34,22 +34,9 @@ type MinimumNeededSegmentType = { export class CallToastNotificationViewModel = Options> extends BaseToastNotificationViewModel implements IAvatarContract { constructor(options: O) { super(options); - this.track( - this.call.members.subscribe({ - onAdd: (_, __) => { - this.emitChange("memberCount"); - }, - onUpdate: (_, __) => { - this.emitChange("memberCount"); - }, - onRemove: (_, __) => { - this.emitChange("memberCount"); - }, - onReset: () => { - this.emitChange("memberCount"); - }, - }) - ); + this.track(this.call.members.observeSize().subscribe(() => { + this.emitChange("memberCount"); + })); // Dismiss the toast if the room is opened manually this.track( this.navigation.observe("room").subscribe((roomId) => {