Implement conditional toasts. Closes #9
Hi, thanks for the awesome library!
Instead of giving the ability to remove toasts on demand, I have thought about checking for a user-provided predicate. This way does not expose any implementation details (including ids) and is fairly flexible.
The given predicate is checked every check number of milliseconds and can be closed manually (this stops checking process).
By the way, it's now possible to remove the RemoveBehaviour type.
Temporary becomes \m -> False, Persistent becomes \m -> True.
The downside of that is that there will be lots of CheckCondition messages generated for persistent toasts. I'm not sure if that is a real problem though.
The commit below showcases the above. Feel free to revert it before merging if you'd like to keep the type.
@pablen could you please take a look?
@pablen I would love to see this added as well. Only thing I'm missing from this great library. Can help if needed.