From 1cdc4ebbe8fb4fd3064ca8565b1e6b1cc72cc502 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Fri, 3 Nov 2023 11:27:16 +0800 Subject: [PATCH] Apply "public" filters for hashtag timeline --- src/pages/hashtag.jsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/pages/hashtag.jsx b/src/pages/hashtag.jsx index d5f71113..977a83c6 100644 --- a/src/pages/hashtag.jsx +++ b/src/pages/hashtag.jsx @@ -14,6 +14,7 @@ import MenuConfirm from '../components/menu-confirm'; import { SHORTCUTS_LIMIT } from '../components/shortcuts-settings'; import Timeline from '../components/timeline'; import { api } from '../utils/api'; +import { filteredItems } from '../utils/filters'; import showToast from '../utils/show-toast'; import states from '../utils/states'; import { saveStatus } from '../utils/states'; @@ -71,12 +72,13 @@ function Hashtags({ media: mediaView, columnMode, ...props }) { onlyMedia: media, }) .next(); - const { value } = results; + let { value } = results; if (value?.length) { if (firstLoad) { latestItem.current = value[0].id; } + value = filteredItems(value, 'public'); value.forEach((item) => { saveStatus(item, instance, { skipThreading: media, // If media view, no need to form threads @@ -102,7 +104,8 @@ function Hashtags({ media: mediaView, columnMode, ...props }) { onlyMedia: media, }) .next(); - const { value } = results; + let { value } = results; + value = filteredItems(value, 'public'); if (value?.length) { return true; } @@ -150,6 +153,7 @@ function Hashtags({ media: mediaView, columnMode, ...props }) { useItemID view={media ? 'media' : undefined} refresh={media} + allowFilters headerEnd={