fix zoom being applied with a delay

This commit is contained in:
Henry Jameson 2025-07-09 15:46:05 +03:00
commit a626b37354

View file

@ -48,6 +48,10 @@ export const adoptStyleSheets = throttle(() => {
} else { } else {
const holder = document.getElementById('custom-styles-holder') const holder = document.getElementById('custom-styles-holder')
for (let i = holder.cssRules.length - 1; i >= 0; --i) {
holder.sheet.deleteRule(i)
}
Object Object
.values(stylesheets) .values(stylesheets)
.forEach(sheet => { .forEach(sheet => {
@ -124,7 +128,8 @@ export const tryLoadCache = async () => {
eagerStyles.ready = true eagerStyles.ready = true
lazyStyles.ready = true lazyStyles.ready = true
adoptStyleSheets() // Don't do this, we need to wait until config adopts its styles first
//adoptStyleSheets()
console.info(`Loaded theme from cache`) console.info(`Loaded theme from cache`)
return true return true