Closed zayaserg closed 1 year ago
As of somewhat recently, a subscription to the view_thread
event no longer seems to fire even though a thread is viewed. I will have to investigate further.
The view_email
listener does still fire.
I am not seeing any .if
elements in the DOM: https://github.com/KartikTalwar/gmail.js/blob/8b73a6b582df119d1060cd5699d1711ae0760387/src/gmail.js#L2467
I changed the sub_selector
to: 'div.PeIF1d'
and it works
PRs welcome.
Happy to put up a PR, but I do have one open question. It looks like the sub_selector concept only supports a single value; however, for backward comparability I think we'd want to keep the old selector as well as adding the new selector. Thoughts?
Agreed.
If this is going to be a recurring problem, adding general support for multiple sub-selectors is probably not a bad and nothing I fundamentally have an issue with.
Try it out and see if you can make it work?
This looks good!
@josteink is there anyway you could merge this? I'd love to update our app.
I was too quick in the review/testing of previous PR.
Upon proper testing I can't make this work at all. Not on new PR-code nor on old master code.
I guess that means there's more work to be done here, but I can't fix that now. I don't have time, at least until sometime next week.
@josteink I am a bit confused here. Are you saying this change broke your experience?
No I'm saying it didn't work without this fix, but it doesn't work with it either.
view_email event works though (no change).
The fix in its current state is released in new version 1.1.5
. No guarantees it will work, but at least it should make it easier to test.
Okay, I just did a hard refresh of my gmail and it seems like the class name used by gmail has changed once again. So agreed, this fix does not work.
I guess that means we might have to use a higher level selector (.bu?) and try to filter it more intelligently in code further down (look for data-thread-id properties)?
Basically something which is generic enough to survive such changes, but not wide enough to cause performance issues.
Ok, I think a better sub_selector is iY
which given its length and proximity to if
is more likely to be stable (?).
PRs welcome 🙂
Merged, available in 1.1.6.
More info would be appreciated 🙂