Unify labels, byte units, snapshot numbers and spelling

This commit is contained in:
Ian Gulliver
2026-10-23 10:33:47 -07:00
parent 68e0cc3063
commit eba85a6a1a
27 changed files with 54 additions and 65 deletions
+2 -6
View File
@@ -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))
}
}