mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-09 14:43:03 -04:00
fix theme flickering on certain actions
This commit is contained in:
parent
ab38e59550
commit
0e7d7541bb
1 changed files with 8 additions and 1 deletions
|
@ -97,7 +97,14 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
|
||||||
SettingsStore.addChangeListener("themeLinks", initThemes);
|
SettingsStore.addChangeListener("themeLinks", initThemes);
|
||||||
SettingsStore.addChangeListener("enabledThemes", initThemes);
|
SettingsStore.addChangeListener("enabledThemes", initThemes);
|
||||||
ThemeStore.addChangeListener(initThemes);
|
|
||||||
|
let currentTheme = ThemeStore.theme;
|
||||||
|
ThemeStore.addChangeListener(() => {
|
||||||
|
if (currentTheme === ThemeStore.theme) return;
|
||||||
|
|
||||||
|
currentTheme = ThemeStore.theme;
|
||||||
|
initThemes();
|
||||||
|
});
|
||||||
|
|
||||||
if (!IS_WEB)
|
if (!IS_WEB)
|
||||||
VencordNative.quickCss.addThemeChangeListener(initThemes);
|
VencordNative.quickCss.addThemeChangeListener(initThemes);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue