mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
hack so we don't revert to single room view when viewing grid
This commit is contained in:
parent
0ffd77762a
commit
368ef9e8e8
@ -102,10 +102,15 @@ class OpenRoomsStore extends Store {
|
||||
const dispatcher = new MatrixDispatcher();
|
||||
// forward all actions coming from the room dispatcher
|
||||
// to the global one
|
||||
const dispatcherRef = dispatcher.register((action) => {
|
||||
action.grid_src_room_id = room_id;
|
||||
action.grid_src_room_alias = room_alias;
|
||||
this.getDispatcher().dispatch(action);
|
||||
const dispatcherRef = dispatcher.register((payload) => {
|
||||
// block a view_room action for the same room because it will switch to
|
||||
// single room mode in MatrixChat
|
||||
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 = {
|
||||
store: new RoomViewStore(dispatcher),
|
||||
|
Loading…
Reference in New Issue
Block a user