mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 00:01:23 +01:00 
			
		
		
		
	s/DidMount/WillMount/ in MessageComposerInput
This fixes the tests that broke with https://github.com/matrix-org/matrix-js-sdk/pull/717 This is because of https://github.com/vector-im/riot-web/blob/master/test/app-tests/joining.js#L63 which prevents the DOM nodes from actually ending up in the DOM, even though the react components get rendered. This means that WillMount and WillUnmount are called, but not DidMount. Using WillMount is more symmertrical anyway since the resulting teardown code must be in WillUnmount (since there is no DidUnmount).
This commit is contained in:
		
							parent
							
								
									9f5ea73dc2
								
							
						
					
					
						commit
						9e64a22884
					
				| @ -336,7 +336,7 @@ export default class MessageComposerInput extends React.Component { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     componentDidMount() { |     componentWillMount() { | ||||||
|         this.dispatcherRef = dis.register(this.onAction); |         this.dispatcherRef = dis.register(this.onAction); | ||||||
|         this.historyManager = new ComposerHistoryManager(this.props.room.roomId, 'mx_slate_composer_history_'); |         this.historyManager = new ComposerHistoryManager(this.props.room.roomId, 'mx_slate_composer_history_'); | ||||||
|     } |     } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user