Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Ensure PersistedElement are unmounted on application logout #5884

Merged
merged 2 commits into from
Apr 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/structures/MatrixChat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
break;
case 'logout':
dis.dispatch({action: "hangup_all"});
dis.dispatch({action: "logout"});
germain-gg marked this conversation as resolved.
Show resolved Hide resolved
Lifecycle.logout();
break;
case 'require_registration':
Expand Down
2 changes: 2 additions & 0 deletions src/components/views/elements/PersistedElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ export default class PersistedElement extends React.Component {
_onAction(payload) {
if (payload.action === 'timeline_resize') {
this._repositionChild();
} else if (payload.action === 'logout') {
PersistedElement.destroyElement(this.props.persistKey);
}
}

Expand Down