From 8c9aa9093ee97b6a6662229747475d41a2375dda Mon Sep 17 00:00:00 2001 From: danidfra Date: Fri, 27 Sep 2024 21:18:25 -0300 Subject: [PATCH] Implement LanguageDropdown --- src/features/public-timeline/index.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/features/public-timeline/index.tsx b/src/features/public-timeline/index.tsx index 37010ae5f..1012c003c 100644 --- a/src/features/public-timeline/index.tsx +++ b/src/features/public-timeline/index.tsx @@ -3,10 +3,11 @@ import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import { Link } from 'react-router-dom'; import { changeSetting } from 'soapbox/actions/settings'; -import { expandPublicTimeline } from 'soapbox/actions/timelines'; +import { clearTimeline, expandPublicTimeline } from 'soapbox/actions/timelines'; import { usePublicStream } from 'soapbox/api/hooks'; import PullToRefresh from 'soapbox/components/pull-to-refresh'; import { Accordion, Column } from 'soapbox/components/ui'; +import { LanguageDropdown } from 'soapbox/components/ui/language-dropdown/language-dropdown'; import { useAppSelector, useAppDispatch, useInstance, useSettings, useTheme, useFeatures } from 'soapbox/hooks'; import { useIsMobile } from 'soapbox/hooks/useIsMobile'; @@ -57,8 +58,13 @@ const PublicTimeline = () => { dispatch(expandPublicTimeline({ onlyMedia })); }, [onlyMedia]); + useEffect(() => { + dispatch(clearTimeline('public')); + dispatch(expandPublicTimeline({ url: '/api/v1/timelines/public' })); + }, []); + return ( - + }> {showExplanationBox && (