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

Fixed a few bugs in toasts. #275

Merged
merged 2 commits into from
Aug 17, 2024
Merged

Fixed a few bugs in toasts. #275

merged 2 commits into from
Aug 17, 2024

Conversation

sirdoombox
Copy link
Collaborator

@sirdoombox sirdoombox commented Aug 16, 2024

Additions

  • Added a button in the toasts page of the demo app to dismiss all active toasts for testing purposes.

Fixes

  • Rare case of causing a toast to be dismissed twice by clicking during the animation fixed.
    • API slightly expanded for ISukiToastManager to allow for checking if a toast has or hasn't been dismissed.
  • Fix potential source of memory leaks and an issue whereby toasts that were recycled via the toast pool could have their delay-based dismiss action called early or multiple times.
    • This involved expanding the API for ISukiToast to include a property which tracks the currently active delay action, and checking that it's the most recent one so that older delays aren't used early.
  • Removed an errant Console.WriteLine that I had stupidly left in whilst I was testing something.

This addresses the issue laid out in #272 along with a few others I discovered along the way.

…ions.

Also removed an errant Console.WriteLine I left in. Discovered a new source of bugs relating to the delay being called twice.
@sirdoombox sirdoombox marked this pull request as ready for review August 16, 2024 18:34
@kikipoulet kikipoulet merged commit fd9608b into kikipoulet:main Aug 17, 2024
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.

2 participants