* Fix unread notification count when polling
Fixes #16236
* Immediately fetch markers to avoid incorrect unread notification count
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) => {
}
if (shouldCountUnreadNotifications(state)) {
- mutable.update('unread', unread => unread + items.count(item => compareId(item.get('id'), lastReadId) > 0));
+ mutable.set('unread', mutable.get('pendingItems').count(item => item !== null) + mutable.get('items').count(item => item && compareId(item.get('id'), lastReadId) > 0));
} else {
const mostRecent = items.find(item => item !== null);
if (mostRecent && compareId(lastReadId, mostRecent.get('id')) < 0) {