HomePhabricator

Notifications - fix race condition around "Mark All Read".

Description

Notifications - fix race condition around "Mark All Read".

Summary:
pre-patch "Mark All Read" marks *all* unread notifications as read. This is a race condition in that the user is looking at some set of notiifcations and that set may update such that the newest notifications aren't shown. An example might be if sitting on the notifications page or having the menu open while a new notification comes in... Note re-opening the menu would show the latest notifications.

This patch makes it so "Mark All Read" links only marks the notifications currently loaded (and older.) Fixes T5764.

Additionally, if there is nothing to "mark read" the button / link "Mark All Read" will have a disabled style and yield a dialog saying "nothing to mark as read".

Test Plan: carefully tracked ?chronoKey populating correctly in various links. Verified query constructed properly too.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5764

Differential Revision: https://secure.phabricator.com/D10113

Details

Provenance
btrahanAuthored on
btrahanPushed on Aug 1 2014, 11:36 PM
Reviewer
epriestley
Differential Revision
D10113: Notifications - fix race condition around "Mark All Read".
Parents
rPd18ba3f0045c: Fix tabs losing scroll position
Branches
Unknown
Tags
Unknown

Event Timeline