Backport new game fix - closes #143
This commit is contained in:
@@ -158,11 +158,12 @@ class DetailsWindow(Adw.Window):
|
|||||||
source_id = "imported"
|
source_id = "imported"
|
||||||
numbers = [0]
|
numbers = [0]
|
||||||
game_id: str
|
game_id: str
|
||||||
for game_id in shared.source_games[source_id]:
|
for game_id in shared.store.source_games.get(source_id, set()):
|
||||||
prefix = "imported_"
|
prefix = "imported_"
|
||||||
if not game_id.startswith(prefix):
|
if not game_id.startswith(prefix):
|
||||||
continue
|
continue
|
||||||
numbers.append(int(game_id.replace(prefix, "", 1)))
|
numbers.append(int(game_id.replace(prefix, "", 1)))
|
||||||
|
|
||||||
game_number = max(numbers) + 1
|
game_number = max(numbers) + 1
|
||||||
|
|
||||||
self.game = Game(
|
self.game = Game(
|
||||||
|
|||||||
Reference in New Issue
Block a user