Fixed Pagination not being updated correctly
Added GuiLoadingListEntry to Lists while in Replay Center
This commit is contained in:
@@ -2,10 +2,8 @@ package eu.crushedpixel.replaymod.api.client.pagination;
|
||||
|
||||
import eu.crushedpixel.replaymod.ReplayMod;
|
||||
import eu.crushedpixel.replaymod.api.client.holders.FileInfo;
|
||||
import eu.crushedpixel.replaymod.online.authentication.AuthenticationHandler;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -33,7 +31,7 @@ public class FavoritedFilePagination implements Pagination {
|
||||
page++;
|
||||
|
||||
try {
|
||||
int[] f = ReplayMod.apiClient.getFavorites(AuthenticationHandler.getKey());
|
||||
List<Integer> f = ReplayMod.favoritedFileHandler.getFavorited();
|
||||
List<Integer> toAdd = new ArrayList<Integer>();
|
||||
for(int i : f) {
|
||||
if(!files.containsKey(i)) {
|
||||
@@ -42,8 +40,6 @@ public class FavoritedFilePagination implements Pagination {
|
||||
}
|
||||
}
|
||||
|
||||
files.keySet().retainAll(Arrays.asList(f));
|
||||
|
||||
FileInfo[] fis = ReplayMod.apiClient.getFileInfo(toAdd);
|
||||
if(fis.length < 1) {
|
||||
page--;
|
||||
|
||||
@@ -4,9 +4,6 @@ import eu.crushedpixel.replaymod.api.client.holders.FileInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by mariusmetzger on 16/05/15.
|
||||
*/
|
||||
public interface Pagination {
|
||||
public List<FileInfo> getFiles();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user