Skip to content

Commit 1767f59

Browse files
andrealmeidrppt
authored andcommitted
Keep Matrix chat persistent
When a user closes the Matrix chat, the iframe is closed and the session is killed, adding a loading delay every time. To avoid this, just hide the iframe instead of closing it.
1 parent 949b02b commit 1767f59

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

bigbluebutton-html5/imports/ui/components/matrix/component.jsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const Matrix = ({
3737
intl,
3838
layoutContextDispatch,
3939
isResizing,
40+
isVisible,
4041
}) => {
4142
const { isChrome } = browserInfo;
4243

@@ -52,7 +53,11 @@ const Matrix = ({
5253
const matrixurl = `/riot-embedded/index.html?urlroomid=${matrixRoomID}&urlemail=${urlemail}&urlregcode=${urlregcode}`;
5354

5455
return (
55-
<Styled.Matrix data-test="matrix" isChrome={isChrome}>
56+
<Styled.Matrix
57+
data-test="matrix"
58+
isChrome={isChrome}
59+
style={{ visibility: isVisible ? 'visible' : 'hidden', }}
60+
>
5661
<Header
5762
leftButtonProps={{
5863
onClick: () => {

bigbluebutton-html5/imports/ui/components/sidebar-content/component.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ const SidebarContent = (props) => {
142142
isToSharedNotesBeShow={sidebarContentPanel === PANELS.SHARED_NOTES}
143143
/>
144144
)}
145-
{sidebarContentPanel === PANELS.MATRIX && <MatrixContainer />}
145+
<MatrixContainer isVisible={sidebarContentPanel === PANELS.MATRIX}/>
146146
{sidebarContentPanel === PANELS.SHARED_NOTES && <NotesContainer />}
147147
{sidebarContentPanel === PANELS.CAPTIONS && <CaptionsContainer />}
148148
{sidebarContentPanel === PANELS.BREAKOUT && <BreakoutRoomContainer />}

0 commit comments

Comments
 (0)