mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
Merge branch 'feature/custom-themes' of github.com:hydralauncher/hydra into feature/custom-themes
This commit is contained in:
commit
4f725d08dc
1 changed files with 5 additions and 3 deletions
|
@ -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"));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue