mkiol / GNotifier

Thunderbird add-on that replaces built-in notifications with the OS native notifications
https://addons.mozilla.org/thunderbird/addon/gnotifier/
GNU General Public License v3.0
164 stars 25 forks source link

"Select on list" must select the message and the appropriate folder in the folder pane #147

Closed lyubenblagoev closed 7 years ago

lyubenblagoev commented 7 years ago

When "Select on list" is chosen in the "Open new message action (Thunderbird only)" option and I click on the notification the message is selected in the message pane, but the selected folder on the folder pane doesn't change. It would be better if the appropriate folder is also selected in the folder pane. If I have another tab opened and click on it and then go back to the main tab, the folder is selected properly. I think there should be an API to select the folder of the message in the folder pane.

mkiol commented 7 years ago

Thanks for the suggestion. BTW, I already try to implement it as you described but failed. Unfortunately there is no obvious API to do it :-(

cofi89 commented 7 years ago

Probably related... Opening a message via notification prevents "Next Message" button from switching to other folder having unread messages unless any other folder is manually selected first.

In other words, opening a message in "Inbox" via notification and going through unread ones there using "Next" button works as expected.
However if at the same time unread messages exist in say, "Archive", clicking "Next" after reading the last message in "Inbox" will not switch to "Archive", unless it or any other folder in the folder pane is manually selected first.

( I'm almost completelly unfamiliar with FF/TB/AddOn's stuff & internals ( js included ), so shooting in the dark here ):
Maybe the code for the "Next/Back/Previous Message" or native notifications would have some pointers at how folder selection is done ( eg. switching to next unread msg in other folder selects both msg and the folder )?? Hopefully revealing an API/way to do it from extension... :eyes:

mkiol commented 7 years ago

@cofi89 Thanks for the hint. I will look at the code behind "Next/Back/Previous Message" buttons...

cofi89 commented 7 years ago

Issue I've mentioned in my previous comment seems to be resolved now ( TB45/Gnotifier 1.9.9pre8 ).
"Next" now switches to unread messages/feeds in another folder(s) correctly. :smiley:

mkiol commented 7 years ago

@cofi89 I am not sure if it is fixed. I didn't do anything. On my TB "Next" still doesn't work....

cofi89 commented 7 years ago

Weird... Which version are you using?
I'm on 45.8.0 on Debian Stretch ( TB self compiled with LTO though, if that could make a difference )...

mkiol commented 7 years ago

I've just tested once again and both "Next" and "Previous" don't work. The root problem here is that selected folder is different from folder where new message is stored. Simply I don't know how to select/deselect folders on TB window. There is no documentation for that, only source code :-)

TB 45.8.0 on openSUSE Thumbleweed

cofi89 commented 7 years ago

I see.
I've looked at the patches that Debian applies, but unfortunatelly there's nothing related that would explain it working on Debian ( or for me atleast ).
Anyhow, I'll try grepping/poking around TB source, and let you know if ( by some dumb luck ) endup finding anything usefull...

cofi89 commented 7 years ago

Issue I've mentioned in my previous comment seems to be resolved now ( TB45/Gnotifier 1.9.9pre8 ). "Next" now switches to unread messages/feeds in another folder(s) correctly.

Turns out I have to take that back... Noticed yesterday that it actually is still happening, allthough not every time. In fact for ~90% of time "Next/Previous" works.
Unfortunatelly I haven't been able to spot any patterns or specific triggers (yet).
Will keep you updated.....

tooomm commented 7 years ago

I've the same issue, and pretty annoying. Hehe. I tend to move and sort a lot of my new mails around. So TB shows me the correct list of mails and highlights the new mail after clicking on the notification. But still there is the former account and folder selected. So it confused me every time and I need to double check and be very careful to not move mails between accounts. :(

mkiol commented 7 years ago

The "select folder" issue is resolved in the latest XPI (1.10.1-dev1). It turned out that it wasn't so difficult after all :-)

Unfortunately, Back/Forward doesn't work even when correct folder is selected. Have no idea why...

tooomm commented 7 years ago

Can't install that version to test for some reason?!

mkiol commented 7 years ago

I had no problems (TB 52.0.1 on Win10). Is there anything suspicious on Error console?

tooomm commented 7 years ago

Needed to update TB first... somehow was still running an old version.

Fix works - very very nice! Thanks. :)

cofi89 commented 7 years ago

@mkiol
Awasome! Works like a charm!
No issue installing ( upgrading actually ) 1.10.1.dev1 with TB45.8 ( Debian is unusually slow for some reason this round with v52... ).


We are ( or I am ) kinda confused here with Next/Previous & Back/Forward, so just to reiterate:

  1. Yep, "Back/Forward" mostly don't work. That is, they only work for the current folder and more often not at all.
  2. "Next/Previous" (unread) are working for me like I've said, for 90% of the time. The rest 10% is that they don't switch to the next/previous folder containing unread messages or feeds ( they're working in current folder only ).

Maybe "Back/Forward" are meant for navigating the current folder only?
Anyhow, that would now be another topic/issue... Thanks again! :smiley:

mkiol commented 7 years ago

Issue resolved in 1.10.5 release.