From feaf3cf7806c69ffae563120fd176103f90e1150 Mon Sep 17 00:00:00 2001 From: Plastikmensch Date: Sat, 29 Jul 2023 08:37:29 +0200 Subject: [PATCH] Fix firehose not indicating new toots in "All" (#2335) When "Show local-only toots in All" is enabled, the column never indicated there are new toots, since `hasUnread` was always false. Signed-off-by: Plastikmensch --- app/javascript/flavours/glitch/features/firehose/index.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/features/firehose/index.jsx b/app/javascript/flavours/glitch/features/firehose/index.jsx index 3c04ac630..71f5a1de6 100644 --- a/app/javascript/flavours/glitch/features/firehose/index.jsx +++ b/app/javascript/flavours/glitch/features/firehose/index.jsx @@ -76,12 +76,12 @@ const Firehose = ({ feedType, multiColumn }) => { const { signedIn } = useIdentity(); const columnRef = useRef(null); - const onlyMedia = useAppSelector((state) => state.getIn(['settings', 'firehose', 'onlyMedia'], false)); - const hasUnread = useAppSelector((state) => state.getIn(['timelines', `${feedType}${onlyMedia ? ':media' : ''}`, 'unread'], 0) > 0); - const allowLocalOnly = useAppSelector((state) => state.getIn(['settings', 'firehose', 'allowLocalOnly'])); const regex = useAppSelector((state) => state.getIn(['settings', 'firehose', 'regex', 'body'])); + const onlyMedia = useAppSelector((state) => state.getIn(['settings', 'firehose', 'onlyMedia'], false)); + const hasUnread = useAppSelector((state) => state.getIn(['timelines', `${feedType}${feedType === 'public' && allowLocalOnly ? ':allow_local_only' : ''}${onlyMedia ? ':media' : ''}`, 'unread'], 0) > 0); + const handlePin = useCallback( () => { switch(feedType) {