From 06fb826435202418fe059f59f92b741a70c08eff Mon Sep 17 00:00:00 2001 From: Tormak <63308171+Tormak9970@users.noreply.github.com> Date: Fri, 12 May 2023 13:43:13 -0500 Subject: [PATCH] feat: logo positions now discard with changes --- src/lib/controllers/AppController.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/controllers/AppController.ts b/src/lib/controllers/AppController.ts index 7955a851..401656bc 100644 --- a/src/lib/controllers/AppController.ts +++ b/src/lib/controllers/AppController.ts @@ -462,6 +462,9 @@ export class AppController { const originalShortcuts = get(originalSteamShortcuts); steamShortcuts.set(JSON.parse(JSON.stringify(originalShortcuts))); + const originalPositions = get(originalLogoPositions); + steamLogoPositions.set(JSON.parse(JSON.stringify(originalPositions))); + ToastController.showSuccessToast("Changes discarded!"); LogController.log("Discarded changes."); @@ -474,9 +477,11 @@ export class AppController { */ static async discardChangesForGame(appId: number): Promise { const originalCache = get(originalAppLibraryCache); + const originalLogoCache = get(originalLogoPositions); const originalShortcuts = get(originalSteamShortcuts); const appCache = get(appLibraryCache); + const logoPositionCache = get(steamLogoPositions); const shortcuts = get(steamShortcuts); const platform = get(currentPlatform); @@ -489,6 +494,9 @@ export class AppController { appCache[appId] = originalCache[appId]; appLibraryCache.set(JSON.parse(JSON.stringify(appCache))); + + logoPositionCache[appId] = originalLogoPositions[appId]; + steamLogoPositions.set(JSON.parse(JSON.stringify(logoPositionCache))); ToastController.showSuccessToast("Discarded!"); LogController.log(`Discarded changes for ${appId}.`);