Skip to content

Commit 6e250c6

Browse files
committed
feat: remove support for pre-Library X UI
1 parent 35e407d commit 6e250c6

File tree

2 files changed

+2
-41
lines changed

2 files changed

+2
-41
lines changed

jsHelper/spicetifyWrapper.js

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ Spicetify.ContextMenu = (() => {
18531853
let navLinkFactoryCtx = null;
18541854
let refreshNavLinks = null;
18551855

1856-
Spicetify._renderNavLinks = (list, isTouchScreenUi, isPreLibX = false) => {
1856+
Spicetify._renderNavLinks = (list, isTouchScreenUi) => {
18571857
const [refreshCount, refresh] = Spicetify.React.useReducer((x) => x + 1, 0);
18581858
refreshNavLinks = refresh;
18591859

@@ -1866,7 +1866,7 @@ Spicetify._renderNavLinks = (list, isTouchScreenUi, isPreLibX = false) => {
18661866
)
18671867
return;
18681868

1869-
const navLinkFactory = isTouchScreenUi ? NavLinkGlobal : isPreLibX ? NavLinkSidebarLegacy : NavLinkSidebar;
1869+
const navLinkFactory = isTouchScreenUi ? NavLinkGlobal : NavLinkSidebar;
18701870

18711871
if (!navLinkFactoryCtx) navLinkFactoryCtx = Spicetify.React.createContext(null);
18721872
const registered = [];
@@ -1951,31 +1951,6 @@ const NavLink = ({ appProper, appRoutePath, icon, activeIcon }) => {
19511951
return NavLinkFactory && Spicetify.React.createElement(NavLinkFactory, { appProper, appRoutePath, createIcon, isActive }, null);
19521952
};
19531953

1954-
const NavLinkSidebarLegacy = ({ appProper, appRoutePath, createIcon, isActive }) => {
1955-
return Spicetify.React.createElement(
1956-
"li",
1957-
{ className: "main-navBar-navBarItem InvalidDropTarget" },
1958-
Spicetify.React.createElement(
1959-
Spicetify.ReactComponent.TooltipWrapper,
1960-
{ label: appProper, placement: "right" },
1961-
Spicetify.React.createElement(
1962-
Spicetify.ReactComponent.Navigation,
1963-
{
1964-
to: appRoutePath,
1965-
referrer: "other",
1966-
className: Spicetify.classnames("link-subtle", "main-navBar-navBarLink", {
1967-
"main-navBar-navBarLinkActive active": isActive,
1968-
}),
1969-
onClick: () => undefined,
1970-
"aria-label": appProper,
1971-
},
1972-
createIcon(),
1973-
Spicetify.React.createElement(Spicetify.ReactComponent.TextComponent, { variant: "mestoBold" }, appProper)
1974-
)
1975-
)
1976-
);
1977-
};
1978-
19791954
const NavLinkSidebar = ({ appProper, appRoutePath, createIcon, isActive }) => {
19801955
const isSidebarCollapsed = Spicetify.Platform.LocalStorageAPI.getItem("ylx-sidebar-state") === 1;
19811956

src/apply/apply.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -335,20 +335,6 @@ func insertNavLink(str string, appNameArray string) string {
335335
1)
336336
}
337337

338-
// pre-Library X
339-
sidebarItemMatch := utils.SeekToCloseParen(
340-
str,
341-
`\("li",\{className:[\w$\.]+\}?,(?:children:)?[\w$\.,()]+\(\w+,\{uri:"spotify:user:@:collection",to:"/collection"`,
342-
'(', ')')
343-
344-
if sidebarItemMatch != "" {
345-
str = strings.Replace(
346-
str,
347-
sidebarItemMatch,
348-
fmt.Sprintf("%s,Spicetify._renderNavLinks([%s], false, true)", sidebarItemMatch, appNameArray),
349-
1)
350-
}
351-
352338
// Global Navbar
353339
utils.ReplaceOnce(&str, `(,[a-zA-Z_\$][\w\$]*===(?:[a-zA-Z_\$][\w\$]*\.){2}HOME_NEXT_TO_NAVIGATION&&.+?)\]`, func(submatches ...string) string {
354340
return fmt.Sprintf("%s,Spicetify._renderNavLinks([%s], true)]", submatches[1], appNameArray)

0 commit comments

Comments
 (0)