mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-12 04:35:55 +03:00
[Tinter.setTheme fix] add missing comment and move old to correct position
This commit is contained in:
parent
58de839621
commit
5b32ecb719
1 changed files with 10 additions and 3 deletions
|
@ -310,12 +310,19 @@ async function loadApp() {
|
||||||
// in case the Tinter.tint() in MatrixChat fires before the
|
// in case the Tinter.tint() in MatrixChat fires before the
|
||||||
// CSS has actually loaded (which in practice happens)...
|
// CSS has actually loaded (which in practice happens)...
|
||||||
|
|
||||||
// FIXME: we should probably block loading the app or even
|
// This if fixes Tinter.setTheme to not fire on Firefox
|
||||||
// showing a spinner until the theme is loaded, to avoid
|
// in case it is the first time loading Riot.
|
||||||
// flashes of unstyled content.
|
// `InstallTrigger` is a Object which only exists on Firefox
|
||||||
|
// (it is used for their Plugins) and can be used as a
|
||||||
|
// feature check.
|
||||||
|
// Firefox loads css always before js. This is why we dont use
|
||||||
|
// onload or it's EventListener as thoose will never trigger.
|
||||||
if (typeof InstallTrigger !== 'undefined') {
|
if (typeof InstallTrigger !== 'undefined') {
|
||||||
Tinter.setTheme(theme);
|
Tinter.setTheme(theme);
|
||||||
} else {
|
} else {
|
||||||
|
// FIXME: we should probably block loading the app or even
|
||||||
|
// showing a spinner until the theme is loaded, to avoid
|
||||||
|
// flashes of unstyled content.
|
||||||
a.onload = () => {
|
a.onload = () => {
|
||||||
Tinter.setTheme(theme);
|
Tinter.setTheme(theme);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue