Rename `.progress` to `progressInstance` for clarity (#8)
This commit is contained in:
parent
1eb3fbfdb9
commit
9918da972d
|
@ -9,10 +9,10 @@ public final class DockProgress {
|
||||||
NSApp.dockTile.contentView = $0
|
NSApp.dockTile.contentView = $0
|
||||||
}
|
}
|
||||||
|
|
||||||
public static var progress: Progress? {
|
public static var progressInstance: Progress? {
|
||||||
didSet {
|
didSet {
|
||||||
if let progress = progress {
|
if let progressInstance = progressInstance {
|
||||||
progressObserver = progress.observe(\.fractionCompleted) { sender, _ in
|
progressObserver = progressInstance.observe(\.fractionCompleted) { sender, _ in
|
||||||
progressValue = sender.fractionCompleted
|
progressValue = sender.fractionCompleted
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ import DockProgress
|
||||||
let progress = Progress(totalUnitCount: 1)
|
let progress = Progress(totalUnitCount: 1)
|
||||||
progress?.becomeCurrent(withPendingUnitCount: 1)
|
progress?.becomeCurrent(withPendingUnitCount: 1)
|
||||||
|
|
||||||
DockProgress.progress = progress
|
DockProgress.progressInstance = progress
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue