~cytrogen/masto-fe

b422b5eebd5cc6e3583ce29262db301bd2955a01 — Plastikmensch 2 years ago ed567c9
Fix showing local only toots in "All" (#2265)

* Fix warnings about missing dependency in hooks

Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>

* Add `allowLocalOnly` to timelineId

Without this local-only toots will never be loaded.

feedType is checked to be public to not show local-only toots in the "Remote" tab.

Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>

---------

Signed-off-by: Plastikmensch <plastikmensch@users.noreply.github.com>
1 files changed, 3 insertions(+), 3 deletions(-)

M app/javascript/flavours/glitch/features/firehose/index.jsx
M app/javascript/flavours/glitch/features/firehose/index.jsx => app/javascript/flavours/glitch/features/firehose/index.jsx +3 -3
@@ 102,7 102,7 @@ const Firehose = ({ feedType, multiColumn }) => {
        break;
      }
    },
    [dispatch, onlyMedia, feedType],
    [dispatch, onlyMedia, allowLocalOnly, feedType],
  );

  const handleHeaderClick = useCallback(() => columnRef.current?.scrollTop(), []);


@@ 132,7 132,7 @@ const Firehose = ({ feedType, multiColumn }) => {
    }

    return () => disconnect?.();
  }, [dispatch, signedIn, feedType, onlyMedia]);
  }, [dispatch, signedIn, feedType, onlyMedia, allowLocalOnly]);

  const prependBanner = feedType === 'community' ? (
    <DismissableBanner id='community_timeline'>


@@ 193,7 193,7 @@ const Firehose = ({ feedType, multiColumn }) => {

        <StatusListContainer
          prepend={prependBanner}
          timelineId={`${feedType}${onlyMedia ? ':media' : ''}`}
          timelineId={`${feedType}${feedType === 'public' && allowLocalOnly ? ':allow_local_only' : ''}${onlyMedia ? ':media' : ''}`}
          onLoadMore={handleLoadMore}
          trackScroll
          scrollKey='firehose'