set executable as null on remove game from library

This commit is contained in:
Zamitto 2024-06-07 18:55:03 -03:00
parent 97abef740c
commit 163b17324e
2 changed files with 5 additions and 2 deletions

View file

@ -104,7 +104,7 @@
"open_download_location": "Abrir local de download", "open_download_location": "Abrir local de download",
"create_shortcut": "Criar atalho", "create_shortcut": "Criar atalho",
"remove_files": "Remover arquivos", "remove_files": "Remover arquivos",
"remove_from_library_description": "Tem certeza que deseja remover {{game}} da sua biblioteca?", "remove_from_library_description": "Isso irá remover {{game}} da sua biblioteca",
"remove_from_library_title": "Tem certeza?" "remove_from_library_title": "Tem certeza?"
}, },
"activation": { "activation": {

View file

@ -5,7 +5,10 @@ const removeGameFromLibrary = async (
_event: Electron.IpcMainInvokeEvent, _event: Electron.IpcMainInvokeEvent,
gameId: number gameId: number
) => { ) => {
gameRepository.update({ id: gameId }, { isDeleted: true }); gameRepository.update(
{ id: gameId },
{ isDeleted: true, executablePath: null }
);
}; };
registerEvent("removeGameFromLibrary", removeGameFromLibrary); registerEvent("removeGameFromLibrary", removeGameFromLibrary);