Browse Source

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.
master
Darius Kazemi 4 years ago
committed by GitHub
parent
commit
8e2530ea16
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      app/javascript/mastodon/features/getting_started/components/announcements.js

+ 1
- 1
app/javascript/mastodon/features/getting_started/components/announcements.js 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'));
}

Loading…
Cancel
Save