fix: Issues with launching and installation on the steam deck

This commit is contained in:
Simeon Radivoev 2026-03-30 20:00:08 +03:00
parent dc0f2d150a
commit ccc5a05ed7
Signed by: simeonradivoev
GPG key ID: C16C2132A7660C8E
19 changed files with 247 additions and 80 deletions

View file

@ -1,8 +1,8 @@
import { DefaultRommStaleTime, GameListFilterType, RommLoginDataSchema } from "@/shared/constants";
import { rommApi, settingsApi } from "../clientApi";
import { mutationOptions, queryOptions } from "@tanstack/react-query";
import { mutationOptions, QueryFilters, queryOptions } from "@tanstack/react-query";
import z from "zod";
import { getCollectionApiCollectionsIdGetOptions, getCollectionsApiCollectionsGetOptions, getCurrentUserApiUsersMeGetOptions, statsApiStatsGetOptions } from "@/clients/romm/@tanstack/react-query.gen";
import { statsApiStatsGetOptions } from "@/clients/romm/@tanstack/react-query.gen";
export const allGamesQuery = (filter?: GameListFilterType) => queryOptions({
queryKey: ['games', filter ?? 'all'],
@ -146,4 +146,12 @@ export const gamesRecommendedBasedOnGameQuery = (source: string, id: string) =>
if (error) throw error;
return data;
}
});
export const gameInvalidationQuery = (source: string, id: string): QueryFilters => ({
predicate (query)
{
if (query.queryKey[0] === 'games') return true;
if (query.queryKey.includes(source) && query.queryKey.includes(id)) return true;
return false;
},
});