Inhibit sending RR when context switching to a room
This commit is contained in:
parent
d203e8f129
commit
e390c3c732
3 changed files with 21 additions and 2 deletions
|
@ -62,6 +62,8 @@ const INITIAL_STATE = {
|
|||
shouldPeek: false,
|
||||
|
||||
viaServers: [],
|
||||
|
||||
wasContextSwitch: false,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -116,6 +118,7 @@ class RoomViewStore extends Store<ActionPayload> {
|
|||
roomId: null,
|
||||
roomAlias: null,
|
||||
viaServers: [],
|
||||
wasContextSwitch: false,
|
||||
});
|
||||
break;
|
||||
case 'view_room_error':
|
||||
|
@ -195,6 +198,7 @@ class RoomViewStore extends Store<ActionPayload> {
|
|||
// pull the user out of Room Settings
|
||||
isEditingSettings: false,
|
||||
viaServers: payload.via_servers,
|
||||
wasContextSwitch: payload.context_switch,
|
||||
};
|
||||
|
||||
// Allow being given an event to be replied to when switching rooms but sanity check its for this room
|
||||
|
@ -231,6 +235,7 @@ class RoomViewStore extends Store<ActionPayload> {
|
|||
roomLoading: true,
|
||||
roomLoadError: null,
|
||||
viaServers: payload.via_servers,
|
||||
wasContextSwitch: payload.context_switch,
|
||||
});
|
||||
try {
|
||||
const result = await MatrixClientPeg.get().getRoomIdForAlias(payload.room_alias);
|
||||
|
@ -256,6 +261,8 @@ class RoomViewStore extends Store<ActionPayload> {
|
|||
room_alias: payload.room_alias,
|
||||
auto_join: payload.auto_join,
|
||||
oob_data: payload.oob_data,
|
||||
viaServers: payload.via_servers,
|
||||
wasContextSwitch: payload.context_switch,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -266,7 +273,6 @@ class RoomViewStore extends Store<ActionPayload> {
|
|||
roomAlias: payload.room_alias,
|
||||
roomLoading: false,
|
||||
roomLoadError: payload.err,
|
||||
viaServers: [],
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -426,6 +432,10 @@ class RoomViewStore extends Store<ActionPayload> {
|
|||
public shouldPeek() {
|
||||
return this.state.shouldPeek;
|
||||
}
|
||||
|
||||
public getWasContextSwitch() {
|
||||
return this.state.wasContextSwitch;
|
||||
}
|
||||
}
|
||||
|
||||
let singletonRoomViewStore = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue