Merge pull request #115 from RobotsAndPencils/EstimatedNewLine

Updates estimated time on info pane to 2 lines for better readability
This commit is contained in:
Matt Kiazyk 2021-03-10 08:28:17 -06:00 committed by GitHub
commit 0c94a76baa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -2,6 +2,9 @@ import os.log
import Foundation
extension Progress {
var xcodesLocalizedDescription: String {
return localizedAdditionalDescription.replacingOccurrences(of: "", with: "\n")
}
func updateFromAria2(string: String) {
let range = NSRange(location: 0, length: string.utf16.count)

View file

@ -48,8 +48,8 @@ public struct ObservingProgressIndicator: View {
)
.help("Downloading: \(Int((progress.progress.fractionCompleted * 100)))% complete")
if showsAdditionalDescription, progress.progress.localizedAdditionalDescription.isEmpty == false {
Text(progress.progress.localizedAdditionalDescription)
if showsAdditionalDescription, progress.progress.xcodesLocalizedDescription.isEmpty == false {
Text(progress.progress.xcodesLocalizedDescription)
.font(.subheadline)
.foregroundColor(.secondary)
}