Fix hiding game toast bug

This commit is contained in:
kramo
2023-04-15 22:02:04 +02:00
parent e3411b8e7e
commit 43ec0e1a1f
2 changed files with 7 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ class CartridgesApplication(Adw.Application):
self.win.update_games([game_id])
def on_hide_game_action(self, _widget, _callback=None, game_id=None):
def on_hide_game_action(self, _widget, _callback=None, game_id=None, toast=True):
if not game_id:
game_id = self.win.active_game_id
@@ -176,6 +176,9 @@ class CartridgesApplication(Adw.Application):
self.win.games[game_id].toggle_hidden()
self.win.update_games([game_id])
if not toast:
return
title = self.win.games[game_id].name
if self.win.games[game_id].hidden:
# The variable is the title of the game