mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 00:01:23 +01:00 
			
		
		
		
	Apply the user's tint once the MatrixClientPeg is moderately ready
Any earlier and we risk getting NPEs from the peg not existing. Fixes https://github.com/vector-im/riot-web/issues/6424
This commit is contained in:
		
							parent
							
								
									5085fd17a0
								
							
						
					
					
						commit
						ebcc65dc7e
					
				| @ -26,6 +26,7 @@ import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set'; | ||||
| import createMatrixClient from './utils/createMatrixClient'; | ||||
| import SettingsStore from './settings/SettingsStore'; | ||||
| import MatrixActionCreators from './actions/MatrixActionCreators'; | ||||
| import Tinter from "./Tinter"; | ||||
| 
 | ||||
| interface MatrixClientCreds { | ||||
|     homeserverUrl: string, | ||||
| @ -128,6 +129,9 @@ class MatrixClientPeg { | ||||
|             opts.lazyLoadMembers = true; | ||||
|         } | ||||
| 
 | ||||
|         const color_scheme = SettingsStore.getValue("roomColor"); | ||||
|         Tinter.tint(color_scheme.primary_color, color_scheme.secondary_color); | ||||
| 
 | ||||
|         // Connect the matrix client to the dispatcher
 | ||||
|         MatrixActionCreators.start(this.matrixClient); | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user