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);
|
||||
|
||||
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"));
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue