Merge branch 'fix-zoom-lag' into 'develop'

fix zoom being applied with a delay

See merge request pleroma/pleroma-fe!2196
This commit is contained in:
HJ 2025-07-09 12:53:51 +00:00
commit 74b410da2b
2 changed files with 6 additions and 1 deletions

0
changelog.d/zoomlag.skip Normal file
View file

View file

@ -50,6 +50,10 @@ export const adoptStyleSheets = throttle(() => {
} else {
const holder = document.getElementById('custom-styles-holder')
for (let i = holder.sheet.cssRules.length - 1; i >= 0; --i) {
holder.sheet.deleteRule(i)
}
Object
.values(stylesheets)
.filter(x => x.ready)
@ -128,7 +132,8 @@ export const tryLoadCache = async () => {
eagerStyles.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`)
return true