nylas-mail icon indicating copy to clipboard operation
nylas-mail copied to clipboard

Preview recent unread emails in menu bar

Open jweinstein opened this issue 10 years ago • 3 comments

Would be great to see "From Name - Subject Line" preview in the Menu bar for last ~3 unread emails in this view: image

jweinstein avatar Jan 21 '16 03:01 jweinstein

This would be a fun starter issue. Right now, this menu is generated by the system-tray plugin, which lives here: https://github.com/nylas/N1/tree/unified-inbox/internal_packages/system-tray/lib.

Right now, the tray-store provides the data to the system-tray, and triggers whenever the count or icon needs to change. I think ideally the tray-store would listen to the Database for threads in the inbox using a "Live Query" like this one: https://github.com/nylas/N1/blob/unified-inbox/src/flux/stores/focused-contacts-store.coffee#L70.

The line Rx.Observable.fromQuery allows you to listen to the results of a database query (like one for the top three threads) and run a callback once when the initial results are fetched, and again whenever the result set changes. We use a lot of optimizations to know when the result set will change and automatically run the query again when necessary.

bengotow avatar Jan 27 '16 07:01 bengotow

Can review Mailplane's menu tray preview for inspiration.

jweinstein avatar Jan 27 '16 18:01 jweinstein

@bengotow This looks interesting! Can you please help me in starting with this issue? It would be my first issue here.

sahildua2305 avatar Sep 22 '16 21:09 sahildua2305