about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDarius Kazemi <darius.kazemi@gmail.com>2020-11-19 08:40:18 -0800
committerGitHub <noreply@github.com>2020-11-19 17:40:18 +0100
commit8e2530ea16332f389edaeba7e87d7447c077bb00 (patch)
tree75bf29afa37ed5feebf5e433351b759b5426a2fc
parent2f6831f3187af0dfd9cacd7d4cba5664be7a9cbd (diff)
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.
-rw-r--r--app/javascript/mastodon/features/getting_started/components/announcements.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/getting_started/components/announcements.js b/app/javascript/mastodon/features/getting_started/components/announcements.js
index d53bd8055..5bc3abac6 100644
--- a/app/javascript/mastodon/features/getting_started/components/announcements.js
+++ b/app/javascript/mastodon/features/getting_started/components/announcements.js
@@ -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'));
   }