fix for seizure when changing styles

This commit is contained in:
booploops 2022-04-11 16:00:19 -07:00
parent 8616f42978
commit cbbeb8009f

View file

@ -960,12 +960,13 @@ const app = new Vue({
}
},
async reloadStyles() {
document.querySelector("body").style.opacity = 0
document.querySelector("body").style.overflow = "hidden"
const styles = this.cfg.visual.styles
document.querySelectorAll(`[id*='less']`).forEach(el => {
if(el.id != "less:style") {
el.remove()
}
});
this.chrome.appliedTheme.info = {}
await asyncForEach(styles, async (style) => {
let styleEl = document.createElement("link")
@ -985,10 +986,6 @@ const app = new Vue({
less.registerStylesheetsImmediately()
less.refresh(true, true, true)
this.$forceUpdate()
setTimeout(() => {
document.querySelector("body").style.opacity = ""
document.querySelector("body").style.overflow = ""
}, 500)
},
macOSEmu() {
this.chrome.forceDirectives["macosemu"] = {