Ensure PersistedElement are unmounted on application logout
							parent
							
								
									2d1615e433
								
							
						
					
					
						commit
						33eebb84a6
					
				| 
						 | 
					@ -586,6 +586,7 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            case 'logout':
 | 
					            case 'logout':
 | 
				
			||||||
                dis.dispatch({action: "hangup_all"});
 | 
					                dis.dispatch({action: "hangup_all"});
 | 
				
			||||||
 | 
					                dis.dispatch({action: "logout"});
 | 
				
			||||||
                Lifecycle.logout();
 | 
					                Lifecycle.logout();
 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            case 'require_registration':
 | 
					            case 'require_registration':
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -139,6 +139,8 @@ export default class PersistedElement extends React.Component {
 | 
				
			||||||
    _onAction(payload) {
 | 
					    _onAction(payload) {
 | 
				
			||||||
        if (payload.action === 'timeline_resize') {
 | 
					        if (payload.action === 'timeline_resize') {
 | 
				
			||||||
            this._repositionChild();
 | 
					            this._repositionChild();
 | 
				
			||||||
 | 
					        } else if (payload.action === 'logout') {
 | 
				
			||||||
 | 
					            PersistedElement.destroyElement(this.props.persistKey);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue