From 8ce8e0691349f2c997446c2e6ed27107fbc392e0 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 4 Apr 2023 11:01:53 +0800 Subject: [PATCH] Add '- Boosts' filter --- src/pages/account-statuses.jsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/pages/account-statuses.jsx b/src/pages/account-statuses.jsx index 3db25f7d..376fee6b 100644 --- a/src/pages/account-statuses.jsx +++ b/src/pages/account-statuses.jsx @@ -19,6 +19,7 @@ function AccountStatuses() { const { id, ...params } = useParams(); const [searchParams, setSearchParams] = useSearchParams(); const excludeReplies = !searchParams.get('replies'); + const excludeBoosts = !!searchParams.get('boosts'); const tagged = searchParams.get('tagged'); const media = !!searchParams.get('media'); const { masto, instance, authenticated } = api({ instance: params.instance }); @@ -52,6 +53,7 @@ function AccountStatuses() { accountStatusesIterator.current = masto.v1.accounts.listStatuses(id, { limit: LIMIT, exclude_replies: excludeReplies, + exclude_reblogs: excludeBoosts, only_media: media, tagged, }); @@ -102,7 +104,7 @@ function AccountStatuses() { const filterBarRef = useRef(); const TimelineStart = useMemo(() => { const cachedAccount = snapStates.accounts[`${id}@${instance}`]; - const filtered = !excludeReplies || tagged || media; + const filtered = !excludeReplies || excludeBoosts || tagged || media; return ( <> + Replies + + - Boosts + ); }