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

Spin Safety #91

Merged
merged 3 commits into from Jan 10, 2022
Merged

Spin Safety #91

merged 3 commits into from Jan 10, 2022

Conversation

meowgorithm
Copy link
Member

This update associates spinner.TickMsgs with with spinners so that spinners will only respond to their own messages. This helps prevent spinners from spinning out of control and allows you to start and stop specific spinners without any logical gymnastics.

As a side effect of this change, the spinner.Tick command has been deprecated in favor of spinner.Model.Tick:

import `github.com/charmbracelet/bubbles/spinner`

// Deprecated: this will start any spinner that receives the resulting TickMsg
return m, spinner.Tick

// New: start a specific spinner
return m, m.mySpinner.Tick()

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

Successfully merging this pull request may close these issues.

None yet

1 participant