mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
retain() in openTimeline
This commit is contained in:
parent
6b3bc37e1d
commit
e92507081f
@ -80,7 +80,6 @@ export class RoomViewModel extends ErrorReportViewModel {
|
||||
await this.logAndCatch("RoomViewModel.load", async log => {
|
||||
this._room.on("change", this._onRoomChange);
|
||||
const timeline = await this._room.openTimeline(log);
|
||||
timeline.retain();
|
||||
this.track(() => timeline.release());
|
||||
this._tileOptions = this.childOptions({
|
||||
session: this.getOption("session"),
|
||||
|
@ -589,6 +589,7 @@ export class BaseRoom extends EventEmitter {
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
this._timeline.retain();
|
||||
return this._timeline;
|
||||
});
|
||||
}
|
||||
|
@ -82,7 +82,6 @@ export class RoomChannel extends Disposables implements IChannel {
|
||||
|
||||
private async subscribeToTimeline() {
|
||||
const timeline = await this.room.openTimeline();
|
||||
timeline.retain();
|
||||
this.track(() => timeline.release());
|
||||
this.track(
|
||||
timeline.entries.subscribe({
|
||||
|
Loading…
Reference in New Issue
Block a user