Started implementing Spectator Hand Rendering

This commit is contained in:
CrushedPixel
2015-05-25 14:18:25 +02:00
parent 2a833b5037
commit 2ecbef3641
7 changed files with 84 additions and 6 deletions

View File

@@ -26,14 +26,14 @@ public class FavoritedFileHandler {
}
public void addToFavorites(Integer id) throws IOException, ApiException {
ReplayMod.apiClient.favFile(AuthenticationHandler.getKey(), id, true);
favorited.remove(id);
favorited.add(id);
ReplayMod.apiClient.favFile(AuthenticationHandler.getKey(), id, true);
}
public void removeFromFavorites(Integer id) throws IOException, ApiException {
favorited.remove(id);
ReplayMod.apiClient.favFile(AuthenticationHandler.getKey(), id, false);
favorited.remove(id);
}
public void reloadFavorites() {

View File

@@ -28,12 +28,12 @@ public class RatedFileHandler {
}
public void rateFile(int id, Rating.RatingType type) throws IOException, ApiException {
ReplayMod.apiClient.rateFile(AuthenticationHandler.getKey(), id, type);
if(type == Rating.RatingType.LIKE || type == Rating.RatingType.DISLIKE) {
rated.put(id, type == Rating.RatingType.LIKE);
} else {
rated.remove(id);
}
ReplayMod.apiClient.rateFile(AuthenticationHandler.getKey(), id, type);
}
public void reloadRatings() {