Unify labels, byte units, snapshot numbers and spelling
This commit is contained in:
@@ -120,10 +120,6 @@ final class Updater: NSObject, SPUUserDriver, SPUUpdaterDelegate {
|
||||
panel = nil
|
||||
}
|
||||
|
||||
private func bytes(_ n: Double) -> String {
|
||||
Int64(n).formatted(.byteCount(style: .file))
|
||||
}
|
||||
|
||||
func updater(_ updater: SPUUpdater, willInstallUpdateOnQuit item: SUAppcastItem, immediateInstallationBlock immediateInstallHandler: @escaping () -> Void) -> Bool {
|
||||
staged = (item, immediateInstallHandler)
|
||||
now = ask(item)
|
||||
@@ -184,9 +180,9 @@ final class Updater: NSObject, SPUUserDriver, SPUUpdaterDelegate {
|
||||
func showDownloadDidReceiveData(ofLength length: UInt64) {
|
||||
progress.done += Double(length)
|
||||
if let total = progress.total {
|
||||
progress.detail = "\(bytes(progress.done)) of \(bytes(total))"
|
||||
progress.detail = "\(bytes(Int64(progress.done))) of \(bytes(Int64(total)))"
|
||||
} else {
|
||||
progress.detail = bytes(progress.done)
|
||||
progress.detail = bytes(Int64(progress.done))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user