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

Add option for idempotent messaging #8

Open
gustafnk opened this issue Oct 24, 2013 · 5 comments
Open

Add option for idempotent messaging #8

gustafnk opened this issue Oct 24, 2013 · 5 comments

Comments

@gustafnk
Copy link

In some scenarios it might be valuable to NOT add a growl message if there already exists a message with the exact same text.

For example, I have generic http error handler in a service and if something fails, I get one message for each failed http request. But I would only like to display a single growl message to the user.

This is of course specific to my application, but I think it could be valuable to others as well. Would you be interested in a pull request for this functionality?

@marcorinck
Copy link
Owner

yes, that would make sense, absolutely.

In fact, I think that should be the standard behaviour, which you should be able to turn off via $growlProvider.

If you want to send a PR please send it to development branch.

@marcorinck
Copy link
Owner

maybe you should name the option "onlyUniqueMessages" or sth. like that. While "idempotent" is technically correct, it would be easier to understand.

@gustafnk
Copy link
Author

Yeah, that is a much friendlier name :)

@marcorinck
Copy link
Owner

I just checked in my solution to the development branch, what do you think?

@gustafnk
Copy link
Author

Beat me to it :) I think it looks good.

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

No branches or pull requests

2 participants