mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Fix peeking keeping two timeline update mechanisms in play
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
4e8cec354d
commit
a2a9dc6cd0
2 changed files with 12 additions and 5 deletions
|
@ -236,6 +236,11 @@ export default createReactClass({
|
|||
showReadReceipts: SettingsStore.getValue("showReadReceipts", roomId),
|
||||
};
|
||||
|
||||
if (!initial && this.state.shouldPeek && !newState.shouldPeek) {
|
||||
// Stop peeking because we have joined this room now
|
||||
this.context.stopPeeking();
|
||||
}
|
||||
|
||||
// Temporary logging to diagnose https://github.com/vector-im/riot-web/issues/4307
|
||||
console.log(
|
||||
'RVS update:',
|
||||
|
|
|
@ -123,6 +123,9 @@ class RoomViewStore extends Store {
|
|||
case 'join_room_error':
|
||||
this._joinRoomError(payload);
|
||||
break;
|
||||
case 'join_room_ready':
|
||||
this._setState({ shouldPeek: false });
|
||||
break;
|
||||
case 'on_client_not_viable':
|
||||
case 'on_logged_out':
|
||||
this.reset();
|
||||
|
@ -259,11 +262,10 @@ class RoomViewStore extends Store {
|
|||
MatrixClientPeg.get().joinRoom(
|
||||
this._state.roomAlias || this._state.roomId, payload.opts,
|
||||
).then(() => {
|
||||
// We don't actually need to do anything here: we do *not*
|
||||
// clear the 'joining' flag because the Room object and/or
|
||||
// our 'joined' member event may not have come down the sync
|
||||
// stream yet, and that's the point at which we'd consider
|
||||
// the user joined to the room.
|
||||
// We do *not* clear the 'joining' flag because the Room object and/or our 'joined' member event may not
|
||||
// have come down the sync stream yet, and that's the point at which we'd consider the user joined to the
|
||||
// room.
|
||||
dis.dispatch({ action: 'join_room_ready' });
|
||||
}, (err) => {
|
||||
dis.dispatch({
|
||||
action: 'join_room_error',
|
||||
|
|
Loading…
Reference in a new issue