Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Mist/Helpers/DownloadManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ class DownloadManager: NSObject, ObservableObject {
private var task: URLSessionDownloadTask?
private var progress: Progress = .init()
var currentValue: Double {
progress.fractionCompleted
// ponytail: clamp to 1.0 - Progress.fractionCompleted can exceed 1.0 when the
// server sends more bytes than the expected Content-Length (e.g. resumed downloads)
min(progress.fractionCompleted, 1)
}

// swiftlint:disable:next cyclomatic_complexity function_body_length
Expand Down