Skip to content

Commit

Permalink
Fix size description
Browse files Browse the repository at this point in the history
  • Loading branch information
luosheng committed May 7, 2017
1 parent 5234051 commit 235d82c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OpenSim/AppInfoView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ final class AppInfoView: NSView {
}

private func update() {
var sizeDescription = "---"
if let size = application.size {
sizeDescription = ByteCountFormatter.string(fromByteCount: Int64(size), countStyle: .file)
}
let string = "\(application.bundleID)\n" +
"Version: \(application.bundleVersion) (\(application.bundleShortVersion))\n" +
"Size: \(application.size ?? 0)"
"Size: \(sizeDescription)"
textField.stringValue = string
}

Expand Down

0 comments on commit 235d82c

Please sign in to comment.