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 <plastikmensch@users.noreply.github.com>
lolsob-rspec
Plastikmensch 2023-07-29 08:37:29 +02:00 committed by GitHub
parent 7b2cfdeda3
commit d7d3466b9a
1 changed files with 3 additions and 3 deletions

View File

@ -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) {