From 365063d30d43203d9c3c70c9f664ed33aca0f3f6 Mon Sep 17 00:00:00 2001 From: Novattz Date: Sat, 17 Jan 2026 20:48:15 +0100 Subject: [PATCH] fix notifications for smokeapi install --- src/contexts/AppProvider.tsx | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/src/contexts/AppProvider.tsx b/src/contexts/AppProvider.tsx index 511ed42..54a2dad 100644 --- a/src/contexts/AppProvider.tsx +++ b/src/contexts/AppProvider.tsx @@ -34,8 +34,6 @@ export const AppProvider = ({ children }: AppProviderProps) => { handleGameAction: executeGameAction, handleDlcConfirm: executeDlcConfirm, unlockerSelectionDialog, - handleSelectCreamLinux, - handleSelectSmokeAPI, closeUnlockerDialog, } = useGameActions() @@ -280,12 +278,26 @@ export const AppProvider = ({ children }: AppProviderProps) => { if (gameId) { const game = games.find((g) => g.id === gameId) if (game) { + + closeUnlockerDialog() + // Reset installing state before showing DLC dialog setGames((prevGames) => prevGames.map((g) => (g.id === gameId ? { ...g, installing: false } : g)) ) - // Call the original handleSelectCreamLinux which will trigger install_cream - handleSelectCreamLinux() + // Show DLC selection dialog directly + setDlcDialog({ + ...dlcDialog, + visible: true, + gameId, + gameTitle: game.title, + dlcs: [], + isLoading: true, + isEditMode: false, + progress: 0, + }) + + streamGameDlcs(gameId) } } }, @@ -293,9 +305,14 @@ export const AppProvider = ({ children }: AppProviderProps) => { // When SmokeAPI is selected, trigger the actual installation const gameId = unlockerSelectionDialog.gameId if (gameId) { - // Close the dialog first - handleSelectSmokeAPI() - // The selection callback will handle the actual installation + const game = games.find((g) => g.id === gameId) + if (game) { + closeUnlockerDialog() + + setTimeout(() => { + handleGameAction(gameId, 'install_smoke') + }, 0) + } } }, closeUnlockerDialog,