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

ClearAll() does only clear List but not Queue #175

Closed
Flatscha opened this issue Nov 2, 2022 · 5 comments
Closed

ClearAll() does only clear List but not Queue #175

Flatscha opened this issue Nov 2, 2022 · 5 comments
Labels
Feature New feature that will be added to the project

Comments

@Flatscha
Copy link
Contributor

Flatscha commented Nov 2, 2022

I have a max toastcount of 3 which get displayed for 3 seconds.
If I get more than 3 messages in 3 seconds they get queued which builds up endlessly.
When I call ClearAll() the 3 toasts shown at the moment getting cleared but old messages still getting dequeued.

Please implement a ClearQueue() - method to fix this problem

Thanks in advance!

@Flatscha Flatscha added Feature Request Request to add a new feature Triage Issue needs to be triaged labels Nov 2, 2022
@chrissainty chrissainty added Feature New feature that will be added to the project and removed Feature Request Request to add a new feature Triage Issue needs to be triaged labels Nov 2, 2022
@chrissainty
Copy link
Member

Hi @Flatscha, this looks like a good suggestion. I agree that adding it as an additional method is the best approach. Are you willing to create a PR for this?

@Flatscha
Copy link
Contributor Author

Flatscha commented Nov 3, 2022

Hi @chrissainty, sure!
Should ClearAll stay the same or should it be modified and clear the list and the queue?

@chrissainty
Copy link
Member

I'd prefer not to change ClearAll as that would be a breaking change. I think we should just add a new method to clear the queue. I think any interesting design question is if the new message should just clear the queue and not active toasts, as that's already covered by the existing method. Developers can then call both if they want to remove everything.

Do you have any thoughts?

Flatscha pushed a commit to Flatscha/clearqueue that referenced this issue Nov 4, 2022
Flatscha pushed a commit to Flatscha/clearqueue that referenced this issue Nov 4, 2022
Flatscha pushed a commit to Flatscha/clearqueue that referenced this issue Nov 4, 2022
@Flatscha
Copy link
Contributor Author

Flatscha commented Nov 8, 2022

Hey @chrissainty,
could you please review my changes?
Thanks.

chrissainty added a commit that referenced this issue Nov 8, 2022
* added possibility to clear queued toasts (#175)

* implemented clearqueue tests (#175)

* added clearqueue to ui (#175)

Co-authored-by: Samuel Flatscher <s.flatscher@metalldeutsch.com>
Co-authored-by: Chris Sainty <chrissainty@users.noreply.github.com>
@chrissainty
Copy link
Member

Resolved by #176

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature that will be added to the project
Projects
None yet
Development

No branches or pull requests

2 participants