sindresorhus / DockProgress

Show progress in your app's Dock icon

Home Page:https://swiftpackageindex.com/sindresorhus/DockProgress/documentation/dockprogress/dockprogress

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Badge does not get removed from icon after calling DockProgress.resetProgress()

jordibruin opened this issue · comments

Again, lovely work @sindresorhus !

Trying to implement it into MacWhisper (www.macwhisper.com) but running into an issue. After the progress is complete and I call DockProgress.resetProgress(), the badge remains visible on the icon.

Any idea what could be causing this?

Relevant code:

`func whisper(_ aWhisper: Whisper, didUpdateProgress progress: Float) {
    self.progress = progress
    DockProgress.style = .badge(badgeValue: {
        Int(progress * 100)
    })
    DockProgress.progress = Double(progress)
}

@MainActor
func whisper(_ aWhisper: Whisper, didCompleteWithSegments segments: [Segment]) {
    DockProgress.progress = Double(1)
    DockProgress.resetProgress()`

I'll look into it.

Please note:

Note: The badgeValue is not meant to be used as a numeric percentage. It's for things like count of downloads, number of files being converted, etc.

There's really no need to show a percentage number and a progress circle. That's just needless noise to the user.

I do wish I had a pie style though. Like the badge style, but no text, just a filled circle pie.