Commit graph

6 commits

Author SHA1 Message Date
Juan Tejada 3d69ebbabb fix+🎨(notifs): Cleanup, handle nonexistent thread when opening notification
Notifications now check to see the thread they are supposed to open
exists.

Also, clean up FocusedContentStore._onFocus so that it doesn't have the side
effect of dispatching another action and messay logic.
Instead, added Actions.ensureCategoryFocused, to focus any category, and which
should be used separately from focusing content (notifications now use
this action for "opening" the thread)
Also, convert FocusedPerspectiveStore to ES6
2016-10-01 00:08:19 -07:00
Aaron Sikes b03a352ee6 Clear notifications when emails are read
Fixes #1393

The objects returned by `new Notification()` have  a `.close()` method.
So we can just keep a list of notifications that have been sent, and
close them when that message has been read.

Conflicts:
	internal_packages/unread-notifications/lib/main.es6
2016-07-08 11:36:51 -07:00
Aaron Sikes fd61c37985 Change pending unread notification stack to be a queue (#2517)
* Remove double negative from test label

It always takes me a second to read a double negative, and be sure I
understood correctly. It's also particularly troublesome for non-native
English speakers.

* Change pending unread notification stack to be a queue

Consider the case where a user launches N1, and has 3 unreads since
their last launch. Additionally, after N1 has launched, they begin
receiving a new mail every 2 seconds.

Current behavior would be a notification for 1 of the 3 unread emails,
then every 2 seconds a notification for the most recently received mail.
They would only finally receive notifications for the other 2 original
messages once they stopped getting new mail.
2016-07-08 11:30:33 -07:00
Juan Tejada eb10d46992 fix(build): Fix linter errors 2016-05-12 14:28:11 -07:00
Jackie Luo 589f77d7e1 refactor(focus): Move code for focusing threads to FocusedContentStore 2016-05-12 13:29:41 -07:00
Ben Gotow a5e3bf86c2 fix(notifs): Don't play notification sounds over and over #1910, #2179 2016-05-09 13:09:10 -07:00