Skip to content

Commit 70a80fe

Browse files
committed
Don't reload roomview on offline connectivity check
Doesn't look like this was a regression as far as I can see, but you did have to switch rooms while offline for it to start happening. There's no use reloading the room until we're online again. Fixes #29072
1 parent f7b010a commit 70a80fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/structures/RoomView.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,13 +1151,14 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
11511151
break;
11521152
case "MatrixActions.sync":
11531153
if (!this.state.matrixClientIsReady) {
1154+
const isReadyNow = Boolean(this.context.client?.isInitialSyncComplete());
11541155
this.setState(
11551156
{
1156-
matrixClientIsReady: !!this.context.client?.isInitialSyncComplete(),
1157+
matrixClientIsReady: isReadyNow,
11571158
},
11581159
() => {
11591160
// send another "initial" RVS update to trigger peeking if needed
1160-
this.onRoomViewStoreUpdate(true);
1161+
if (isReadyNow) this.onRoomViewStoreUpdate(true);
11611162
},
11621163
);
11631164
}

0 commit comments

Comments
 (0)