Don't reload roomview on offline connectivity check (#29243)
* 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 https://github.com/element-hq/element-web/issues/29072 * Add regression test * Move it down the file to avoid changing the snapshots
This commit is contained in:
@@ -1151,13 +1151,14 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
break;
|
||||
case "MatrixActions.sync":
|
||||
if (!this.state.matrixClientIsReady) {
|
||||
const isReadyNow = Boolean(this.context.client?.isInitialSyncComplete());
|
||||
this.setState(
|
||||
{
|
||||
matrixClientIsReady: !!this.context.client?.isInitialSyncComplete(),
|
||||
matrixClientIsReady: isReadyNow,
|
||||
},
|
||||
() => {
|
||||
// send another "initial" RVS update to trigger peeking if needed
|
||||
this.onRoomViewStoreUpdate(true);
|
||||
if (isReadyNow) this.onRoomViewStoreUpdate(true);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user