Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jordibruin opened this issue Feb 27, 2023 · 4 comments

Comments

@jordibruin
Copy link

jordibruin commented Feb 27, 2023

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()`
@sindresorhus
Copy link
Owner

I'll look into it.

@sindresorhus
Copy link
Owner

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.

@sindresorhus
Copy link
Owner

@sindresorhus
Copy link
Owner

I also added a .pie style: https://github.com/sindresorhus/DockProgress#pie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants