Fix click on faded left/right/middle panel -> close settings
- implement generic dispatch to close user/room/group settings - use dispatch to allow clicks on disabled left/right/middle panel to close settings A much more maintainable approach would be to use dedicate routing instead of doing different things depending on what page of the app is currently being viewed. At the very least we could make the concept of a settings page generic.
This commit is contained in:
@@ -44,6 +44,8 @@ const INITIAL_STATE = {
|
||||
forwardingEvent: null,
|
||||
|
||||
quotingEvent: null,
|
||||
|
||||
isEditingSettings: false,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -116,6 +118,16 @@ class RoomViewStore extends Store {
|
||||
replyingToEvent: payload.event,
|
||||
});
|
||||
break;
|
||||
case 'open_room_settings':
|
||||
this._setState({
|
||||
isEditingSettings: true,
|
||||
});
|
||||
break;
|
||||
case 'close_settings':
|
||||
this._setState({
|
||||
isEditingSettings: false,
|
||||
});
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,6 +313,10 @@ class RoomViewStore extends Store {
|
||||
return this._state.replyingToEvent;
|
||||
}
|
||||
|
||||
isEditingSettings() {
|
||||
return this._state.isEditingSettings;
|
||||
}
|
||||
|
||||
shouldPeek() {
|
||||
return this._state.shouldPeek;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user