Skip to content

Commit

Permalink
fix: fixed xcode 16 compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
rnr committed Sep 30, 2024
1 parent d3deebb commit 2d3be71
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Core/Core/Network/DownloadManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,11 @@ public class DownloadManager: DownloadManagerProtocol {
// MARK: - Intents

public func isLargeVideosSize(blocks: [CourseBlock]) -> Bool {
(blocks.reduce(0) {
$0 + Double($1.encodedVideo?.video(downloadQuality: downloadQuality)?.fileSize ?? 0)
} / 1024 / 1024 / 1024) > 1
var totalSize: Int = 0
blocks.forEach { block in
totalSize += block.encodedVideo?.video(downloadQuality: downloadQuality)?.fileSize ?? 0
}
return totalSize / (1024 * 1024 * 1024) > 1
}

public func getDownloadTasks() async -> [DownloadDataTask] {
Expand Down

0 comments on commit 2d3be71

Please sign in to comment.