Feature request: Set max number of toasts
See original GitHub issueFirst of all, THANK YOU! This is such an awesome little library. Compared to some of the other packages that implement toasts, your design around handling multiple toasts is sublime. Also, I love how easy it is to customize styling. I could go on.
I need to set a max number of toasts. Currently, I do it like this:
toast.subscribe((toasts) => {
if (toasts.length > 5) {
toasts.pop();
}
});
But I don’t think that’s very nice. I’d rather there was something like a all
or toasts
attribute on toast
, which gave a list of toasts so I could do something like:
if (toasts.all.length < 5) {
toast.push(...)
}
I can of course also keep track of the number of toasts with a global variable, but this is not very nice I think.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
[Feature Request] Option to set a Max number of toasts shown ...
This would just allow a certain number of toasts to show and if a new toast gets added then it would remove the...
Read more >Rate limiting - - Developer guide - Toast APIs
A rate limit is a collection of limits. For example, 20 requests per second and 10,000 requests per fifteen minutes. Toast APIs return...
Read more >Can an Android Toast be longer than Toast.LENGTH_LONG?
This means they are treated as flags rather than actual durations so I don't think it will be possible to set the duration...
Read more >Toast | Android Developers
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. final Class<?> ......
Read more >Device restart notifications - Configuration Manager
A Windows toast notification informs the user that the device needs to restart. ... The maximum value is 20160 minutes (two weeks).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This should be fixed in
v0.7.2
.Awesome. Again, really enjoying your work. Thanks a lot!