You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-12-01 04:43:29 +03:00
Merge pull request #1904 from matrix-org/robertlong/callfeed-dispose
Properly dispose of CallFeeds
This commit is contained in:
@@ -543,6 +543,10 @@ export class MatrixCall extends EventEmitter {
|
||||
}
|
||||
|
||||
private deleteAllFeeds(): void {
|
||||
for (const feed of this.feeds) {
|
||||
feed.dispose();
|
||||
}
|
||||
|
||||
this.feeds = [];
|
||||
this.emit(CallEvent.FeedsChanged, this.feeds);
|
||||
}
|
||||
@@ -556,6 +560,7 @@ export class MatrixCall extends EventEmitter {
|
||||
return;
|
||||
}
|
||||
|
||||
feed.dispose();
|
||||
this.feeds.splice(this.feeds.indexOf(feed), 1);
|
||||
this.emit(CallEvent.FeedsChanged, this.feeds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user