Skip to content

Commit

Permalink
Merge pull request #115 from RobotsAndPencils/EstimatedNewLine
Browse files Browse the repository at this point in the history
Updates estimated time on info pane to 2 lines for better readability
  • Loading branch information
MattKiazyk authored Mar 10, 2021
2 parents 126a7c2 + da56b2a commit 0c94a76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Xcodes/Backend/Progress+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions Xcodes/Frontend/Common/ObservingProgressIndicator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 0c94a76

Please sign in to comment.