Add rating to the client (#1498)

This commit is contained in:
Quercitron 2016-05-17 17:27:43 +03:00
parent 972d59aa37
commit c781728b97
16 changed files with 234 additions and 52 deletions

View file

@ -199,14 +199,16 @@ public class UserManager {
public String getUserHistory(String userName) {
User user = getUserByName(userName);
if (user == null) {
UserStats userStats = UserStatsRepository.instance.getUser(userName);
if (userStats == null) {
return "User " + userName + " not found";
}
return "History of user " + userName + ": " + User.userStatsToHistory(userStats.getProto());
if (user != null) {
return "History of user " + userName + " - " + user.getUserData().getHistory();
}
return "History of user " + userName + ": " + user.getUserData().getHistory();
UserStats userStats = UserStatsRepository.instance.getUser(userName);
if (userStats != null) {
return "History of user " + userName + " - " + User.userStatsToHistory(userStats.getProto());
}
return "User " + userName + " not found";
}
public void updateUserHistory() {