diff --git a/src/backend-impl/decky-backend-repository-impl.ts b/src/backend-impl/decky-backend-repository-impl.ts index b8db8da..6db65a5 100644 --- a/src/backend-impl/decky-backend-repository-impl.ts +++ b/src/backend-impl/decky-backend-repository-impl.ts @@ -16,6 +16,7 @@ class DeckyBackendRepository implements IBackendRepository { } async fetch(url: string, request: RequestInit) { try { + console.log("CSSLODAER FETCH", url, request); const res = await fetchNoCors(url, request); if (!res.ok) { throw new Error(`Res Not Okay - Code ${res.status}`); diff --git a/src/modules/theme-store/context/ThemeBrowserStore.tsx b/src/modules/theme-store/context/ThemeBrowserStore.tsx index 6435831..a77dfec 100644 --- a/src/modules/theme-store/context/ThemeBrowserStore.tsx +++ b/src/modules/theme-store/context/ThemeBrowserStore.tsx @@ -25,22 +25,19 @@ interface IThemeBrowserStore extends ThemeBrowserStoreValues, ThemeBrowserStoreA const ThemeBrowserStoreContext = createContext | null>(null); function generateParamStr(searchOpts: ThemeQueryRequest) { + const searchOptsClone = structuredClone(searchOpts); let prependString = "BPM-CSS.-Preset"; - switch (searchOpts.filters) { - // If it's desktop themes, remove the "BPM Only" filter in the default - case "Desktop": - prependString = "-Preset"; - break; - // If it's presets, remove the preset exclusion in the default - case "Preset": - prependString = "BPM-CSS"; - break; + if (searchOptsClone.filters.includes("Desktop")) { + prependString = "-Preset"; } - searchOpts.filters === "All" ? (searchOpts.filters = "") : (prependString += "."); - prependString && (searchOpts.filters = prependString + searchOpts.filters); + if (searchOptsClone.filters.includes("Preset")) { + prependString = "BPM-CSS"; + } + searchOptsClone.filters === "All" ? (searchOptsClone.filters = "") : (prependString += "."); + prependString && (searchOptsClone.filters = prependString + searchOptsClone.filters); // @ts-expect-error - const paramStr = new URLSearchParams(searchOpts).toString(); + const paramStr = new URLSearchParams(searchOptsClone).toString(); return paramStr; }