You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-03 00:33:22 +03:00 
			
		
		
		
	remove custom LoggedInView::shouldComponentUpdate logic
This commit is contained in:
		@@ -219,16 +219,6 @@ class LoggedInView extends React.Component<IProps, IState> {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Child components assume that the client peg will not be null, so give them some
 | 
					 | 
				
			||||||
    // sort of assurance here by only allowing a re-render if the client is truthy.
 | 
					 | 
				
			||||||
    //
 | 
					 | 
				
			||||||
    // This is required because `LoggedInView` maintains its own state and if this state
 | 
					 | 
				
			||||||
    // updates after the client peg has been made null (during logout), then it will
 | 
					 | 
				
			||||||
    // attempt to re-render and the children will throw errors.
 | 
					 | 
				
			||||||
    shouldComponentUpdate() {
 | 
					 | 
				
			||||||
        return Boolean(MatrixClientPeg.get());
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    canResetTimelineInRoom = (roomId) => {
 | 
					    canResetTimelineInRoom = (roomId) => {
 | 
				
			||||||
        if (!this._roomView.current) {
 | 
					        if (!this._roomView.current) {
 | 
				
			||||||
            return true;
 | 
					            return true;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user