From f10217c591303a3d00faf07d946216cd5d424f2d Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 17 May 2023 16:19:46 +0530 Subject: [PATCH] No need to await here --- src/matrix/room/timeline/Timeline.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/matrix/room/timeline/Timeline.js b/src/matrix/room/timeline/Timeline.js index b6d2f72d..31d6fdb5 100644 --- a/src/matrix/room/timeline/Timeline.js +++ b/src/matrix/room/timeline/Timeline.js @@ -29,9 +29,7 @@ import {RetainedValue} from "../../../utils/RetainedValue"; export class Timeline extends RetainedValue { constructor({roomId, storage, closeCallback, fragmentIdComparer, pendingEvents, clock, powerLevelsObservable, hsApi}) { - super(() => { - this.dispose(); - }); + super(() => { this.dispose(); }); this._roomId = roomId; this._storage = storage; this._closeCallback = closeCallback; @@ -89,7 +87,7 @@ export class Timeline extends RetainedValue { const readerRequest = this._disposables.track(this._timelineReader.readFromEnd(20, txn, log)); try { const entries = await readerRequest.complete(); - await this._loadContextEntriesWhereNeeded(entries); + this._loadContextEntriesWhereNeeded(entries); this._setupEntries(entries); } finally { this._disposables.disposeTracked(readerRequest);