mirror of
https://github.com/vector-im/element-web.git
synced 2025-08-24 07:51:34 +02:00
Move tinter init to MatrixChat
This is a much better place for it to live
This commit is contained in:
parent
f8fd0c34cb
commit
6323d78b0c
@ -27,7 +27,6 @@ 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 {phasedRollOutExpiredForUser} from "./PhasedRollOut";
|
import {phasedRollOutExpiredForUser} from "./PhasedRollOut";
|
||||||
import Tinter from "./Tinter";
|
|
||||||
|
|
||||||
interface MatrixClientCreds {
|
interface MatrixClientCreds {
|
||||||
homeserverUrl: string,
|
homeserverUrl: string,
|
||||||
@ -134,9 +133,6 @@ class MatrixClientPeg {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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);
|
||||||
|
|
||||||
|
@ -1403,6 +1403,11 @@ export default React.createClass({
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Fire the tinter right on startup to ensure the default theme is applied
|
||||||
|
// A later sync can/will correct the tint to be the right value for the user
|
||||||
|
const color_scheme = SettingsStore.getValue("roomColor");
|
||||||
|
Tinter.tint(color_scheme.primary_color, color_scheme.secondary_color);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user