From 61da8b771a5e7d1062311e7d985060ff169ceb0a Mon Sep 17 00:00:00 2001 From: Tormak <63308171+Tormak9970@users.noreply.github.com> Date: Tue, 2 Apr 2024 23:21:02 -0400 Subject: [PATCH] fix: no longer uses non dfl gamepadtabbedpages --- src/GamepadTabbedPageClasses.ts | 43 ------------------------ src/components/CustomTabContainer.tsx | 2 +- src/components/filters/FilterOptions.tsx | 2 +- src/components/filters/Filters.tsx | 2 +- 4 files changed, 3 insertions(+), 46 deletions(-) delete mode 100644 src/GamepadTabbedPageClasses.ts diff --git a/src/GamepadTabbedPageClasses.ts b/src/GamepadTabbedPageClasses.ts deleted file mode 100644 index 4d2e44a..0000000 --- a/src/GamepadTabbedPageClasses.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { findModule } from "decky-frontend-lib"; - -type GamepadTabbedPageClasses = Record< - | 'duration-app-launch' - | 'headerHeight' - | 'contentPadding' - | 'GamepadTabbedPage' - | 'TabHeaderRowWrapper' - | 'Floating' - | 'TabRow' - | 'TabRowTabs' - | 'BleedGlyphs' - | 'TabsRowScroll' - | 'FixCenterAlignScroll' - | 'Tab' - | 'Selected' - | 'HasAddon' - | 'RightAddon' - | 'TabTitle' - | 'LeftAddon' - | 'TabCount' - | 'Active' - | 'TabBadge' - | 'TabCountBadge' - | 'TabRowSpacer' - | 'Glyphs' - | 'Show' - | 'TabContents' - | 'ContentTransition' - | 'TabContentsScroll' - | 'Right' - | 'Enter' - | 'EnterActive' - | 'Exit' - | 'ExitActive' - | 'Left' - | 'TabIcon', - string>; - - -export const gamepadTabbedPageClasses: GamepadTabbedPageClasses = findModule( - (mod) => typeof mod === 'object' && mod?.GamepadTabbedPage?.includes('gamepadtabbedpage_'), -); diff --git a/src/components/CustomTabContainer.tsx b/src/components/CustomTabContainer.tsx index 828695e..ce46770 100644 --- a/src/components/CustomTabContainer.tsx +++ b/src/components/CustomTabContainer.tsx @@ -1,7 +1,7 @@ import { EditableTabSettings } from "./modals/EditTabModal"; import { TabFilterSettings, FilterType, Filter } from "./filters/Filters"; -import { gamepadTabbedPageClasses } from "../GamepadTabbedPageClasses"; import { filtersHaveType, getIncludedCategoriesFromBitField } from "../lib/Utils"; +import { gamepadTabbedPageClasses } from "decky-frontend-lib"; /** * Wrapper for injecting custom tabs. diff --git a/src/components/filters/FilterOptions.tsx b/src/components/filters/FilterOptions.tsx index ada5e54..f3426f2 100644 --- a/src/components/filters/FilterOptions.tsx +++ b/src/components/filters/FilterOptions.tsx @@ -821,7 +821,7 @@ const AchievementsFilterOptions: VFC> = ({ in label={`${value}% or ${thresholdType === 'above' ? 'more' : 'less'} achievements completed`} description={ - +
diff --git a/src/components/filters/Filters.tsx b/src/components/filters/Filters.tsx index 8bff18e..14d1543 100644 --- a/src/components/filters/Filters.tsx +++ b/src/components/filters/Filters.tsx @@ -173,6 +173,7 @@ export function canBeInverted(filter: TabFilterSettings): boolean { case "merge": case "deck compatibility": case "steam features": + case "achievements": case "sd card": return true; case "platform": @@ -185,7 +186,6 @@ export function canBeInverted(filter: TabFilterSettings): boolean { case "release date": case "last played": case "demo": - case "achievements": case "streamable": return false; }