Compare commits
No commits in common. "8e84fe2ff53b91af67df00fa4a902afad7f6c48e" and "7d92099a9598a0ed5e2adc3380ff160d2bd2f477" have entirely different histories.
8e84fe2ff5
...
7d92099a95
1 changed files with 0 additions and 8 deletions
|
@ -43,7 +43,6 @@ import java.net.Proxy;
|
|||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import com.luca0n.joguitos.pluck.R;
|
||||
import com.luca0n.joguitos.pluck.PluckApplication;
|
||||
|
@ -128,11 +127,7 @@ public class ApiUtil {
|
|||
|
||||
ArrayList<TriviaQuestion> questions = new ArrayList<>();
|
||||
|
||||
int elements = 0;
|
||||
|
||||
for (JsonElement element : jsonArray) {
|
||||
if (elements++ == filters.getAmount())
|
||||
break;
|
||||
JsonObject object = element.getAsJsonObject();
|
||||
TriviaType type = TriviaType.get(object.get("type").getAsString());
|
||||
|
||||
|
@ -157,9 +152,6 @@ public class ApiUtil {
|
|||
if (questions.size() == 0)
|
||||
throw new NoTriviaResultsException();
|
||||
|
||||
// Shuffle the question array.
|
||||
Collections.shuffle(questions);
|
||||
|
||||
return questions;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue