-
Notifications
You must be signed in to change notification settings - Fork 457
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
gmail.observer.on('view_email',function(obj){}) is firing multiple times #752
Comments
Depending on how you register the event, it could be registered many times (and thus fired many times). Can you reproduce the issue using the boilerplate repo? |
I see, in boilerplate there is outdated packages, but even with latest one it fires now 2 times |
I guess the answer is either to create idempotent event handlers (firing 1 or multiple times gives the same result), or someone fixing the event-triggering in gmailjs. I'm not able to go fix the code anytime soon, so PRs are definitely welcome. |
Could it be related to that line with empty class? |
Might be. I didn't personally implement the latest revision of this particular code, so I'm not 100% sure. Remove it and see if it still works? If so, that sounds like a simple PR, right? :) |
Unfortunatly it's not an issue), it's workaround to get view email event on open email in thread before last one |
`gmail.observe.on('view_email', function (obj) {
priotityTag();
});`
I have this code but whenever I run it, this function is triggered multiple times and I dont get why, from my understanding, it should be triggered only when I click in an email and stop, once I click and open an email, my console.log prints 4 times +
Any idea why this is happening?
Thank you very much
The text was updated successfully, but these errors were encountered: