diff options
author | Thibaut Girka <thib@sitedethib.com> | 2020-09-15 20:54:26 +0200 |
---|---|---|
committer | ThibG <thib@sitedethib.com> | 2020-09-17 15:22:56 +0200 |
commit | 94c290d7d2179adeb0437c00b571f62c41c7fd12 (patch) | |
tree | 8f7a88454905e9266220fec351a395575c7a82ed /app/javascript/flavours/glitch/features | |
parent | 145ed3797810cc652976a6198d6b23618e570bfd (diff) |
Only update read marker when giving focus/mounting column
Diffstat (limited to 'app/javascript/flavours/glitch/features')
-rw-r--r-- | app/javascript/flavours/glitch/features/notifications/index.js | 4 |
1 files changed, 2 insertions, 2 deletions
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 { |