Store improvements

- Store games by source
- Added convenience dunder methods (contains, iter, len, getitem)
- Added store.get
- Changed `enable_in_pipeline` for `toggle_in_pipeline`
This commit is contained in:
GeoffreyCoulaud
2023-07-07 18:06:07 +02:00
parent dc232e1e43
commit 87a4319360
5 changed files with 55 additions and 15 deletions

View File

@@ -214,10 +214,9 @@ class PreferencesWindow(Adw.PreferencesWindow):
self.toast.dismiss()
def remove_all_games(self, *_args):
for game in shared.store.games.values():
for game in shared.store:
if not game.removed:
self.removed_games.add(game)
game.removed = True
game.save()
game.update()