Only update read marker when giving focus/mounting column

This commit is contained in:
Thibaut Girka
2020-09-15 20:54:26 +02:00
committed by ThibG
parent 145ed37978
commit 94c290d7d2
2 changed files with 9 additions and 2 deletions

View File

@ -57,7 +57,7 @@ const mapStateToProps = state => ({
hasMore: state.getIn(['notifications', 'hasMore']),
numPending: state.getIn(['notifications', 'pendingItems'], ImmutableList()).size,
notifCleaningActive: state.getIn(['notifications', 'cleaningMode']),
lastReadId: state.getIn(['notifications', 'lastReadId']),
lastReadId: state.getIn(['notifications', 'readMarkerId']),
});
/* glitch */
@ -227,7 +227,7 @@ class Notifications extends React.PureComponent {
accountId={item.get('account')}
onMoveUp={this.handleMoveUp}
onMoveDown={this.handleMoveDown}
unread={lastReadId && compareId(item.get('id'), lastReadId) > 0}
unread={lastReadId !== '0' && compareId(item.get('id'), lastReadId) > 0}
/>
));
} else {