Refactor minimal shell mode to refcounting (#10319)

This commit is contained in:
Samuel Newman
2026-04-21 13:04:02 -07:00
committed by GitHub
parent 6d53459e92
commit 3153ea4302
40 changed files with 152 additions and 393 deletions
-12
View File
@@ -1,28 +1,16 @@
import {useCallback} from 'react'
import {useFocusEffect} from '@react-navigation/native'
import {
type CommonNavigatorParams,
type NativeStackScreenProps,
} from '#/lib/routes/types'
import {makeRecordUri} from '#/lib/strings/url-helpers'
import {useSetMinimalShellMode} from '#/state/shell'
import {PostThread} from '#/screens/PostThread'
import * as Layout from '#/components/Layout'
type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostThread'>
export function PostThreadScreen({route}: Props) {
const setMinimalShellMode = useSetMinimalShellMode()
const {name, rkey} = route.params
const uri = makeRecordUri(name, 'app.bsky.feed.post', rkey)
useFocusEffect(
useCallback(() => {
setMinimalShellMode(false)
}, [setMinimalShellMode]),
)
return (
<Layout.Screen testID="postThreadScreen">
<PostThread uri={uri} />