mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-25 04:59:18 +00:00
@@ -201,10 +201,9 @@ public class Util {
|
||||
List<List<T>> results = new LinkedList<>();
|
||||
|
||||
for (int index=0;index<list.size();index+=partitionSize) {
|
||||
int offset = index * partitionSize;
|
||||
int subListSize = Math.min(partitionSize, list.size() - offset);
|
||||
int subListSize = Math.min(partitionSize, list.size() - index);
|
||||
|
||||
results.add(list.subList(offset, offset + subListSize));
|
||||
results.add(list.subList(index, index + subListSize));
|
||||
}
|
||||
|
||||
return results;
|
||||
|
||||
Reference in New Issue
Block a user