mirror of
https://github.com/XcodesOrg/XcodesApp.git
synced 2026-03-25 08:55:46 +00:00
Merge pull request #115 from RobotsAndPencils/EstimatedNewLine
Updates estimated time on info pane to 2 lines for better readability
This commit is contained in:
commit
0c94a76baa
2 changed files with 5 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue