Skip to content

Commit

Permalink
showing only active players when selecting players to play in a game (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mkieres authored Jan 19, 2024
1 parent 06e7121 commit d9653b3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ abstract class _PlaythroughPlayersSelectionViewModel with Store {

@computed
ObservableList<Player> get players =>
([..._playersStore.players].sortAlphabetically()).asObservable();
([..._playersStore.activePlayers].sortAlphabetically()).asObservable();

@computed
Map<String, Player> get playersMap => {for (final player in players) player.id: player};
Expand All @@ -46,7 +46,5 @@ abstract class _PlaythroughPlayersSelectionViewModel with Store {
selectedPlayersMap[player.id] = player;
}

Future<void> _loadPlayers() async {
await _playersStore.loadPlayers();
}
Future<void> _loadPlayers() async => _playersStore.loadPlayers();
}

0 comments on commit d9653b3

Please sign in to comment.