forked from External/mage
Cache UserStats to User.
This commit is contained in:
parent
c6eff03339
commit
8a5461d73b
6 changed files with 38 additions and 14 deletions
|
|
@ -426,6 +426,11 @@ public class Main {
|
|||
} else {
|
||||
UserStatsRepository.instance.update(new UserStats(builder.build(), table.getEndTimeMs()));
|
||||
}
|
||||
// UserStats for this player is updated, so refresh it.
|
||||
User user = UserManager.getInstance().getUserByName(player.getName());
|
||||
if (user != null) {
|
||||
user.resetUserStats();
|
||||
}
|
||||
}
|
||||
} else if (table.hasTourney()) {
|
||||
TourneyProto tourney = table.getTourney();
|
||||
|
|
@ -451,6 +456,11 @@ public class Main {
|
|||
} else {
|
||||
UserStatsRepository.instance.update(new UserStats(builder.build(), table.getEndTimeMs()));
|
||||
}
|
||||
// UserStats for this player is updated, so refresh it.
|
||||
User user = UserManager.getInstance().getUserByName(player.getName());
|
||||
if (user != null) {
|
||||
user.resetUserStats();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue