Mark correctly as read reverse-order announcements (#15070)

This fixes a bug in #15065 where the "read" indicator was not getting correctly set. The ID of a dismissed announcement is now correct.
lolsob-rspec
Darius Kazemi 2020-11-19 08:40:18 -08:00 committed by GitHub
parent b0bc965658
commit 8681af3303
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ class Announcements extends ImmutablePureComponent {
_markAnnouncementAsRead () {
const { dismissAnnouncement, announcements } = this.props;
const { index } = this.state;
const announcement = announcements.get(index);
const announcement = announcements.get(announcements.size - 1 - index);
if (!announcement.get('read')) dismissAnnouncement(announcement.get('id'));
}