Skip to content

Commit

Permalink
Do a slightly better job of keeping the view up to date when a game i…
Browse files Browse the repository at this point in the history
…s hidden by the user.
  • Loading branch information
danieljohnson2 committed May 14, 2024
1 parent 655301c commit 52fb949
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lutris/gui/lutriswindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1135,9 +1135,14 @@ def is_game_displayed(self, game):

# If the update took the row out of this view's category, we'll need
# to update the view to reflect that.
if row.type in ("category", "user_category"):
search = self.get_game_search()
enforce_hidden = not search.has_component("hidden")
if row.type == "dynamic_category" and row.id == "recent":
if enforce_hidden and ".hidden" in game.get_categories():
return False
elif row.type in ("category", "user_category"):
categories = game.get_categories()
if row.id != ".hidden" and ".hidden" in categories:
if enforce_hidden and row.id != ".hidden" and ".hidden" in categories:
return False

if row.id != "all" and row.id not in categories:
Expand Down

0 comments on commit 52fb949

Please sign in to comment.