Added "Downloaded" Tab to Replay Center to be able to open downloaded replays

This commit is contained in:
CrushedPixel
2015-05-16 18:44:53 +02:00
parent 1c818cbaa7
commit 6196fa3ee9
7 changed files with 70 additions and 46 deletions

View File

@@ -40,9 +40,11 @@ public class DownloadedFilePagination implements Pagination {
}
}
files.keySet().retainAll(f.keySet());
try {
FileInfo[] fis = ReplayMod.apiClient.getFileInfo(toAdd);
if(fis.length <= 1) {
if(fis.length < 1) {
page--;
return false;
}

View File

@@ -5,6 +5,7 @@ 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;
@@ -40,9 +41,11 @@ public class FavoritedFilePagination implements Pagination {
if(toAdd.size() >= Pagination.PAGE_SIZE) break;
}
}
files.keySet().retainAll(Arrays.asList(f));
FileInfo[] fis = ReplayMod.apiClient.getFileInfo(toAdd);
if(fis.length <= 1) {
if(fis.length < 1) {
page--;
return false;
}

View File

@@ -36,7 +36,7 @@ public class SearchPagination implements Pagination {
try {
FileInfo[] fis = ReplayMod.apiClient.searchFiles(searchQuery);
if(fis.length <= 1) {
if(fis.length < 1) {
page--;
return false;
}