From 94c290d7d2179adeb0437c00b571f62c41c7fd12 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 15 Sep 2020 20:54:26 +0200 Subject: Only update read marker when giving focus/mounting column --- app/javascript/flavours/glitch/features/notifications/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/javascript/flavours/glitch/features/notifications/index.js') diff --git a/app/javascript/flavours/glitch/features/notifications/index.js b/app/javascript/flavours/glitch/features/notifications/index.js index cef0a0d2a..1c8c68218 100644 --- a/app/javascript/flavours/glitch/features/notifications/index.js +++ b/app/javascript/flavours/glitch/features/notifications/index.js @@ -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 { -- cgit