From d679ae7dbb5d76bf5441239e1c9314cb229c1a0f Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 28 Feb 2024 16:08:11 +0000 Subject: [PATCH] Use selected feed for window title on Home (#3016) --- src/view/screens/Home.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/view/screens/Home.tsx b/src/view/screens/Home.tsx index 8f2f9618..7ad9beb5 100644 --- a/src/view/screens/Home.tsx +++ b/src/view/screens/Home.tsx @@ -17,6 +17,7 @@ import {UsePreferencesQueryResponse} from '#/state/queries/preferences/types' import {emitSoftReset} from '#/state/events' import {useSession} from '#/state/session' import {useSelectedFeed, useSetSelectedFeed} from '#/state/shell/selected-feed' +import {useSetTitle} from '#/lib/hooks/useSetTitle' type Props = NativeStackScreenProps export function HomeScreen(props: Props) { @@ -66,6 +67,8 @@ function HomeScreenReady({ const selectedIndex = Math.max(0, maybeFoundIndex) const selectedFeed = allFeeds[selectedIndex] + useSetTitle(pinnedFeedInfos[selectedIndex]?.displayName) + const pagerRef = React.useRef(null) const lastPagerReportedIndexRef = React.useRef(selectedIndex) React.useLayoutEffect(() => {