before adding LoadingSpinner

This commit is contained in:
Natlinux81
2022-08-27 19:06:39 +02:00
parent fa278fc245
commit 7fe2fd08ea
7 changed files with 52 additions and 24 deletions

View File

@@ -50,6 +50,9 @@ namespace Apollon.WPF.Stores
public async Task Add(Tournament tournament)
{
await _createTournamentCommand.Execute(tournament);
_tournaments.Add(tournament);
TournamentAdded?.Invoke(tournament);
}
@@ -59,7 +62,7 @@ namespace Apollon.WPF.Stores
int currentIndex = _tournaments.FindIndex(y => y.Id == tournament.Id);
if (currentIndex == -1)
if (currentIndex != -1)
{
_tournaments[currentIndex] = tournament;
}