about summary refs log tree commit diff
path: root/app/javascript/mastodon/features
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-05-19 23:51:05 +0200
committerGitHub <noreply@github.com>2021-05-19 23:51:05 +0200
commit92f1d739b554b6d5496013fb50196a14434943e2 (patch)
tree176dfd15d9cff8c8f445239fe0d8c8b8b37d7d2c /app/javascript/mastodon/features
parent689974b1ed081c238560d6b368609acc50dc7336 (diff)
Fix unread notification count when polling (#16272)
* Fix unread notification count when polling

Fixes #16236

* Immediately fetch markers to avoid incorrect unread notification count
Diffstat (limited to 'app/javascript/mastodon/features')
-rw-r--r--app/javascript/mastodon/features/ui/index.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js
index 2b9fe1603..c1c6ac739 100644
--- a/app/javascript/mastodon/features/ui/index.js
+++ b/app/javascript/mastodon/features/ui/index.js
@@ -361,9 +361,9 @@ class UI extends React.PureComponent {
       this.props.dispatch(closeOnboarding());
     }
 
+    this.props.dispatch(fetchMarkers());
     this.props.dispatch(expandHomeTimeline());
     this.props.dispatch(expandNotifications());
-    setTimeout(() => this.props.dispatch(fetchMarkers()), 500);
     setTimeout(() => this.props.dispatch(fetchFilters()), 500);
 
     this.hotkeys.__mousetrap__.stopCallback = (e, element) => {