Skip to content

Commit 8c5705e

Browse files
committed
Execute loadAlltimelineEvents once at a time
1 parent f127c9d commit 8c5705e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/host/app/services/matrix-service.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1234,8 +1234,12 @@ export default class MatrixService extends Service {
12341234
throw new Error(`Cannot find room with id ${roomId}`);
12351235
}
12361236

1237-
this.timelineLoadingState.set(roomId, true);
1237+
if (this.timelineLoadingState.get(roomId)) {
1238+
return;
1239+
}
1240+
12381241
let token = waiter.beginAsync();
1242+
this.timelineLoadingState.set(roomId, true);
12391243
try {
12401244
while (room.oldState.paginationToken != null) {
12411245
await this.client.scrollback(room);

0 commit comments

Comments
 (0)