Skip to content

Commit ca670fa

Browse files
committed
feat(wrapper): set buttons heigh for 1.2.45 and older for Library X
1 parent 3e5dc5b commit ca670fa

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

jsHelper/spicetifyWrapper.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,6 +1019,21 @@ Spicetify.Events = (() => {
10191019
Spicetify.Platform.UserAPI._product_state_service = productStateApi;
10201020
})();
10211021

1022+
(async function setButtonsHeight() {
1023+
while (!Spicetify.CosmosAsync) {
1024+
await new Promise((res) => setTimeout(res, 100));
1025+
}
1026+
const expFeatures = JSON.parse(localStorage.getItem("spicetify-exp-features") || "{}");
1027+
const isGlobalNavbar = expFeatures?.enableGlobalNavBar?.value;
1028+
1029+
if (typeof isGlobalNavbar !== "undefined" && isGlobalNavbar === "control") {
1030+
await Spicetify.CosmosAsync.post("sp://messages/v1/container/control", {
1031+
type: "update_titlebar",
1032+
height: Spicetify.Platform.PlatformData.os_name === "windows" ? "40" : "42",
1033+
});
1034+
}
1035+
})();
1036+
10221037
setInterval(() => {
10231038
if (playerState.cache?.isPaused === false) {
10241039
const event = new Event("onprogress");

0 commit comments

Comments
 (0)