Merge branch 'feature/custom-themes' of github.com:hydralauncher/hydra into feature/custom-themes

This commit is contained in:
Chubby Granny Chaser 2025-02-16 20:33:00 +00:00
commit 4f725d08dc
No known key found for this signature in database

View file

@ -61,14 +61,16 @@ export function HeroPanelActions() {
setToggleLibraryGameDisabled(true); setToggleLibraryGameDisabled(true);
try { try {
if (game?.favorite) { if (game?.favorite && objectId) {
await window.electron await window.electron
.removeGameFromFavorites(shop, objectId!) .removeGameFromFavorites(shop, objectId)
.then(() => { .then(() => {
showSuccessToast(t("game_removed_from_favorites")); showSuccessToast(t("game_removed_from_favorites"));
}); });
} else { } else {
await window.electron.addGameToFavorites(shop, objectId!).then(() => { if (!objectId) return;
await window.electron.addGameToFavorites(shop, objectId).then(() => {
showSuccessToast(t("game_added_to_favorites")); showSuccessToast(t("game_added_to_favorites"));
}); });
} }