mirror of
https://github.com/element-hq/element-web
synced 2024-11-23 09:46:09 +03: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
1 changed files with 4 additions and 0 deletions
|
@ -26,6 +26,7 @@ import EventTimelineSet from 'matrix-js-sdk/lib/models/event-timeline-set';
|
||||||
import createMatrixClient from './utils/createMatrixClient';
|
import createMatrixClient from './utils/createMatrixClient';
|
||||||
import SettingsStore from './settings/SettingsStore';
|
import SettingsStore from './settings/SettingsStore';
|
||||||
import MatrixActionCreators from './actions/MatrixActionCreators';
|
import MatrixActionCreators from './actions/MatrixActionCreators';
|
||||||
|
import Tinter from "./Tinter";
|
||||||
|
|
||||||
interface MatrixClientCreds {
|
interface MatrixClientCreds {
|
||||||
homeserverUrl: string,
|
homeserverUrl: string,
|
||||||
|
@ -128,6 +129,9 @@ class MatrixClientPeg {
|
||||||
opts.lazyLoadMembers = true;
|
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
|
// Connect the matrix client to the dispatcher
|
||||||
MatrixActionCreators.start(this.matrixClient);
|
MatrixActionCreators.start(this.matrixClient);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue