Skip to content

Commit

Permalink
settings: fix compile on Xcode 14.3
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Apr 27, 2023
1 parent 1269d3d commit d70da92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Platform/Shared/VMConfigDriveDetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ struct VMConfigDriveDetailsView: View {
}
}

if let imageUrl = config.imageURL, let fileSize = data.computeSize(for: imageUrl) {
if let imageUrl = config.imageURL {
let fileSize = data.computeSize(for: imageUrl)
DefaultTextField("Size", text: .constant(ByteCountFormatter.string(fromByteCount: fileSize, countStyle: .binary))).disabled(true)
} else if config.sizeMib > 0 {
DefaultTextField("Size", text: .constant(ByteCountFormatter.string(fromByteCount: Int64(config.sizeMib) * bytesInMib, countStyle: .binary))).disabled(true)
Expand Down

0 comments on commit d70da92

Please sign in to comment.