mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-19 04:40:53 +00:00
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.
This commit is contained in:
parent
2f6831f318
commit
8e2530ea16
|
@ -396,7 +396,7 @@ class Announcements extends ImmutablePureComponent {
|
||||||
_markAnnouncementAsRead () {
|
_markAnnouncementAsRead () {
|
||||||
const { dismissAnnouncement, announcements } = this.props;
|
const { dismissAnnouncement, announcements } = this.props;
|
||||||
const { index } = this.state;
|
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'));
|
if (!announcement.get('read')) dismissAnnouncement(announcement.get('id'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue