about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/features/community_timeline/index.js
diff options
context:
space:
mode:
authorReverite <github@reverite.sh>2019-09-18 16:38:31 -0700
committerReverite <github@reverite.sh>2019-09-18 16:38:31 -0700
commit73f4af117fc5b5e4ee3337d634f5e589a9353644 (patch)
tree62b0443573ba5038fd45aa14d4243dfc832c060a /app/javascript/flavours/glitch/features/community_timeline/index.js
parent849e2bc4ca11892e701835a4696904d78b1ad325 (diff)
parentfebcdad2e2c98aee62b55ee21bdf0debf7c6fd6b (diff)
Merge branch 'glitch' into production
Diffstat (limited to 'app/javascript/flavours/glitch/features/community_timeline/index.js')
-rw-r--r--app/javascript/flavours/glitch/features/community_timeline/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/javascript/flavours/glitch/features/community_timeline/index.js b/app/javascript/flavours/glitch/features/community_timeline/index.js
index cb7d72c53..5585edc9c 100644
--- a/app/javascript/flavours/glitch/features/community_timeline/index.js
+++ b/app/javascript/flavours/glitch/features/community_timeline/index.js
@@ -18,9 +18,10 @@ const mapStateToProps = (state, { onlyMedia, columnId }) => {
   const uuid = columnId;
   const columns = state.getIn(['settings', 'columns']);
   const index = columns.findIndex(c => c.get('uuid') === uuid);
+  const timelineState = state.getIn(['timelines', `community${onlyMedia ? ':media' : ''}`]);
 
   return {
-    hasUnread: state.getIn(['timelines', `community${onlyMedia ? ':media' : ''}`, 'unread']) > 0,
+    hasUnread: !!timelineState && (timelineState.get('unread') > 0 || timelineState.get('pendingItems').size > 0),
     onlyMedia: (columnId && index >= 0) ? columns.get(index).getIn(['params', 'other', 'onlyMedia']) : state.getIn(['settings', 'community', 'other', 'onlyMedia']),
   };
 };