mirror of https://github.com/vector-im/riot-web
hack so we don't revert to single room view when viewing grid
parent
0ffd77762a
commit
368ef9e8e8
|
@ -102,10 +102,15 @@ class OpenRoomsStore extends Store {
|
||||||
const dispatcher = new MatrixDispatcher();
|
const dispatcher = new MatrixDispatcher();
|
||||||
// forward all actions coming from the room dispatcher
|
// forward all actions coming from the room dispatcher
|
||||||
// to the global one
|
// to the global one
|
||||||
const dispatcherRef = dispatcher.register((action) => {
|
const dispatcherRef = dispatcher.register((payload) => {
|
||||||
action.grid_src_room_id = room_id;
|
// block a view_room action for the same room because it will switch to
|
||||||
action.grid_src_room_alias = room_alias;
|
// single room mode in MatrixChat
|
||||||
this.getDispatcher().dispatch(action);
|
if (payload.action === 'view_room' && room_id === payload.room_id) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
payload.grid_src_room_id = room_id;
|
||||||
|
payload.grid_src_room_alias = room_alias;
|
||||||
|
this.getDispatcher().dispatch(payload);
|
||||||
});
|
});
|
||||||
const openRoom = {
|
const openRoom = {
|
||||||
store: new RoomViewStore(dispatcher),
|
store: new RoomViewStore(dispatcher),
|
||||||
|
|
Loading…
Reference in New Issue