Fix display of total optimization count
This commit is contained in:
parent
f52c3bc8b9
commit
225c68ecd1
@ -266,8 +266,9 @@ final class ImageGenerator {
|
|||||||
let all = generatedImages
|
let all = generatedImages
|
||||||
.filter { imageOptimSupportedFileExtensions.contains($0.lastComponentAfter(".")) }
|
.filter { imageOptimSupportedFileExtensions.contains($0.lastComponentAfter(".")) }
|
||||||
.map { output.appendingPathComponent($0).path }
|
.map { output.appendingPathComponent($0).path }
|
||||||
for i in stride(from: 0, to: all.count, by: imageOptimizationBatchSize) {
|
numberOfImagesToOptimize = all.count
|
||||||
let endIndex = min(i+imageOptimizationBatchSize, all.count)
|
for i in stride(from: 0, to: numberOfImagesToOptimize, by: imageOptimizationBatchSize) {
|
||||||
|
let endIndex = min(i+imageOptimizationBatchSize, numberOfImagesToOptimize)
|
||||||
let batch = all[i..<endIndex]
|
let batch = all[i..<endIndex]
|
||||||
if optimizeImageBatch(batch) {
|
if optimizeImageBatch(batch) {
|
||||||
optimizedImages.formUnion(batch)
|
optimizedImages.formUnion(batch)
|
||||||
|
Loading…
Reference in New Issue
Block a user