Fixed button color logic extension

This commit is contained in:
Jurn Wubben 2026-02-03 21:10:40 +01:00
parent a13663cdbd
commit d40affac9a

View file

@ -195,6 +195,7 @@ class SpotiQueue {
this.reconnectInterval, this.reconnectInterval,
this.closing, this.closing,
); );
if (!this.reconnectInterval && !this.closing) { if (!this.reconnectInterval && !this.closing) {
this.reconnectInterval = setInterval( this.reconnectInterval = setInterval(
() => this.connect(), () => this.connect(),
@ -202,14 +203,17 @@ class SpotiQueue {
); );
} }
if (this.button) this.button.style.color = "" if (this.button && !this.closing) {
this.button.style.color = ""
}
this.closing = false; this.closing = false;
} }
initUi() { initUi() {
const btn = new Spicetify.Topbar.Button( const btn = new Spicetify.Topbar.Button(
"SpotiQueue", "SpotiQueue",
"enhance", // SVG icon or markup "enhance",
() => {}, () => {},
); );
@ -268,3 +272,4 @@ class SpotiQueue {
globalThis.spotiQueue = new SpotiQueue(); globalThis.spotiQueue = new SpotiQueue();
globalThis.spotiQueue.initUi(); globalThis.spotiQueue.initUi();
})(); })();