mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-22 18:21:39 +01:00
listen for members.size changes in CallTile and emit update so memberCount binding updates
also be consistent to not emit updates on call object when changing members map
This commit is contained in:
parent
38d5a4412b
commit
90ba35da7a
@ -30,6 +30,7 @@ export class CallTile extends SimpleTile {
|
||||
super(entry, options);
|
||||
const calls = this.getOption("session").callHandler.calls;
|
||||
this._callSubscription = undefined;
|
||||
this._memberSizeSubscription = undefined;
|
||||
const call = calls.get(this._entry.stateKey);
|
||||
if (call && !call.isTerminated) {
|
||||
this._call = call;
|
||||
@ -37,6 +38,9 @@ export class CallTile extends SimpleTile {
|
||||
this._callSubscription = this.track(this._call.disposableOn("change", () => {
|
||||
this._onCallUpdate();
|
||||
}));
|
||||
this._memberSizeSubscription = this.track(this._call.members.observeSize().subscribe(() => {
|
||||
this.emitChange("memberCount");
|
||||
}));
|
||||
this._onCallUpdate();
|
||||
}
|
||||
}
|
||||
|
@ -549,7 +549,6 @@ export class GroupCall extends EventEmitter<{change: never}> {
|
||||
member.dispose();
|
||||
this._members.remove(memberKey);
|
||||
}
|
||||
this.emitChange();
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user