You've already forked element-web
mirror of
https://github.com/element-hq/element-web.git
synced 2025-11-29 21:23:11 +03:00
Show chat panel when opening a video room with unread messages (#8812)
* Show chat panel when opening a video room with unread messages * Remove unnecessary calls to private methods in tests * Make room ID mandatory when toggling the right panel * Restore the isViewingRoom check * Test RightPanelStore * Make the constructor private again * Add even more tests * Fix onReady
This commit is contained in:
@@ -361,7 +361,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
) {
|
||||
// hide chat in right panel when the widget is minimized
|
||||
RightPanelStore.instance.setCard({ phase: RightPanelPhases.RoomSummary });
|
||||
RightPanelStore.instance.togglePanel();
|
||||
RightPanelStore.instance.togglePanel(this.state.roomId);
|
||||
}
|
||||
this.checkWidgets(this.state.room);
|
||||
};
|
||||
@@ -1020,6 +1020,14 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
||||
this.updatePermissions(room);
|
||||
this.checkWidgets(room);
|
||||
|
||||
if (
|
||||
this.getMainSplitContentType(room) !== MainSplitContentType.Timeline
|
||||
&& RoomNotificationStateStore.instance.getRoomState(room).isUnread
|
||||
) {
|
||||
// Automatically open the chat panel to make unread messages easier to discover
|
||||
RightPanelStore.instance.setCard({ phase: RightPanelPhases.Timeline }, true, room.roomId);
|
||||
}
|
||||
|
||||
this.setState({
|
||||
tombstone: this.getRoomTombstone(room),
|
||||
liveTimeline: room.getLiveTimeline(),
|
||||
|
||||
Reference in New Issue
Block a user