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 => {
|
await this.logAndCatch("RoomViewModel.load", async log => {
|
||||||
this._room.on("change", this._onRoomChange);
|
this._room.on("change", this._onRoomChange);
|
||||||
const timeline = await this._room.openTimeline(log);
|
const timeline = await this._room.openTimeline(log);
|
||||||
timeline.retain();
|
|
||||||
this.track(() => timeline.release());
|
this.track(() => timeline.release());
|
||||||
this._tileOptions = this.childOptions({
|
this._tileOptions = this.childOptions({
|
||||||
session: this.getOption("session"),
|
session: this.getOption("session"),
|
||||||
|
@ -589,6 +589,7 @@ export class BaseRoom extends EventEmitter {
|
|||||||
} finally {
|
} finally {
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
|
this._timeline.retain();
|
||||||
return this._timeline;
|
return this._timeline;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -82,7 +82,6 @@ export class RoomChannel extends Disposables implements IChannel {
|
|||||||
|
|
||||||
private async subscribeToTimeline() {
|
private async subscribeToTimeline() {
|
||||||
const timeline = await this.room.openTimeline();
|
const timeline = await this.room.openTimeline();
|
||||||
timeline.retain();
|
|
||||||
this.track(() => timeline.release());
|
this.track(() => timeline.release());
|
||||||
this.track(
|
this.track(
|
||||||
timeline.entries.subscribe({
|
timeline.entries.subscribe({
|
||||||
|
Loading…
Reference in New Issue
Block a user