mirror of
https://github.com/lutris/lutris
synced 2024-09-30 04:54:18 +00:00
Do a slightly better job of keeping the view up to date when a game is hidden by the user.
This commit is contained in:
parent
655301cf03
commit
52fb949ff5
|
@ -1135,9 +1135,14 @@ class LutrisWindow(Gtk.ApplicationWindow, DialogLaunchUIDelegate, DialogInstallU
|
|||
|
||||
# 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:
|
||||
|
|
Loading…
Reference in a new issue