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

Implement conditional toasts. Closes #9 #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

malinoff
Copy link

@malinoff malinoff commented May 21, 2019

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).

@malinoff
Copy link
Author

malinoff commented May 21, 2019

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.

@malinoff
Copy link
Author

@pablen could you please take a look?

@icidasset
Copy link

@pablen I would love to see this added as well. Only thing I'm missing from this great library. Can help if needed.

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