Skip to content

Commit

Permalink
Merge pull request #1713 from skateman/notifications-inorder
Browse files Browse the repository at this point in the history
Sort asynchronously arrived notifications by timestamp in the drawer
(cherry picked from commit 06dd3f3)

https://bugzilla.redhat.com/show_bug.cgi?id=1479922
  • Loading branch information
himdel authored and simaishi committed Aug 9, 2017
1 parent dae2e1d commit f958942
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function eventNotifications($timeout, API) {
});
if (group) {
if (group.notifications) {
group.notifications.splice(0, 0, newNotification);
group.notifications.splice(_.sortedIndex(group.notifications, newNotification, function (x) { return -x.timeStamp; }), 0, newNotification);
} else {
group.notifications = [newNotification];
}
Expand Down

0 comments on commit f958942

Please sign in to comment.