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

notification can override provider's preventDup #188

Merged
merged 1 commit into from
Nov 4, 2019
Merged

notification can override provider's preventDup #188

merged 1 commit into from
Nov 4, 2019

Conversation

williammetcalf
Copy link
Contributor

Currently if a provider has preventDuplicates={true}, then duplicates will be prevented even if a individual notification has preventDuplicates explicitly set to false.

This PR changes that behavior, so duplicates will never be prevented for some notification if it has preventDuplicates: false, regardless of the provider settings

@iamhosseindhv
Copy link
Owner

Thanks for the PR @williammetcalf . Current implementation is intentional. Prevent duplicate is something that's configured on a Provider level and not individual snackbar.

Is there a specific use case you have where you need it to be overridden?

@williammetcalf
Copy link
Contributor Author

In the docs preventDuplicate is listed in the "Mutual Props" section.

My use case is in our app we want most of our notifications to have duplicates prevented, but every now and then we want a type of notification which can be duplicated. It would be easier to prevent duplicates by default and allow them explicitly in the few places we need, rather than the other way around.

@iamhosseindhv
Copy link
Owner

I see @williammetcalf. Thanks for your contribution.

@iamhosseindhv iamhosseindhv merged commit f10c075 into iamhosseindhv:master Nov 4, 2019
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