From 2058e3f38beb56afb47e6c26125dbbb911c61934 Mon Sep 17 00:00:00 2001 From: Gravita Date: Fri, 23 Apr 2021 15:46:46 +0700 Subject: [PATCH] [FEATURE] SizedFile Collection shuffle --- .../src/main/java/pro/gravit/launcher/AsyncDownloader.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java b/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java index 663c34a4..34a93ffe 100644 --- a/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java +++ b/LauncherCore/src/main/java/pro/gravit/launcher/AsyncDownloader.java @@ -116,6 +116,9 @@ public List> sortFiles(List files, int threads) { result.get(minIndex).add(file); sizes[minIndex] += file.size; } + for(List l : result) { + Collections.shuffle(l); + } return result; }