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);
try {
if (game?.favorite) {
if (game?.favorite && objectId) {
await window.electron
.removeGameFromFavorites(shop, objectId!)
.removeGameFromFavorites(shop, objectId)
.then(() => {
showSuccessToast(t("game_removed_from_favorites"));
});
} else {
await window.electron.addGameToFavorites(shop, objectId!).then(() => {
if (!objectId) return;
await window.electron.addGameToFavorites(shop, objectId).then(() => {
showSuccessToast(t("game_added_to_favorites"));
});
}