make home page full bleed
This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
|||||||
useState,
|
useState,
|
||||||
} from 'react'
|
} from 'react'
|
||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
import {type AppBskyActorDefs, AppBskyFeedDefs} from '@atproto/api'
|
import {type AppBskyActorDefs, AppBskyFeedDefs} from '@atproto/api'
|
||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
@@ -70,7 +71,8 @@ export function FeedPage({
|
|||||||
const {openComposer} = useOpenComposer()
|
const {openComposer} = useOpenComposer()
|
||||||
const [isScrolledDown, setIsScrolledDown] = useState(false)
|
const [isScrolledDown, setIsScrolledDown] = useState(false)
|
||||||
const setMinimalShellMode = useSetMinimalShellMode()
|
const setMinimalShellMode = useSetMinimalShellMode()
|
||||||
const headerOffset = useHeaderOffset()
|
const {top: topInset} = useSafeAreaInsets()
|
||||||
|
const headerOffset = useHeaderOffset() + topInset
|
||||||
const feedFeedback = useFeedFeedback(feedInfo, hasSession)
|
const feedFeedback = useFeedFeedback(feedInfo, hasSession)
|
||||||
const scrollElRef = useRef<ListMethods>(null)
|
const scrollElRef = useRef<ListMethods>(null)
|
||||||
const [hasNew, setHasNew] = useState(false)
|
const [hasNew, setHasNew] = useState(false)
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {type JSX} from 'react'
|
import {type JSX} from 'react'
|
||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import Animated from 'react-native-reanimated'
|
import Animated from 'react-native-reanimated'
|
||||||
|
import {useSafeAreaInsets} from 'react-native-safe-area-context'
|
||||||
import {msg} from '@lingui/macro'
|
import {msg} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
|
|
||||||
@@ -30,18 +31,18 @@ export function HomeHeaderLayoutMobile({
|
|||||||
const headerMinimalShellTransform = useMinimalShellHeaderTransform()
|
const headerMinimalShellTransform = useMinimalShellHeaderTransform()
|
||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
const playHaptic = useHaptics()
|
const playHaptic = useHaptics()
|
||||||
|
const {top: paddingTop} = useSafeAreaInsets()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Animated.View
|
<Animated.View
|
||||||
style={[
|
style={[
|
||||||
a.fixed,
|
a.fixed,
|
||||||
|
a.top_0,
|
||||||
|
a.left_0,
|
||||||
|
a.right_0,
|
||||||
a.z_10,
|
a.z_10,
|
||||||
t.atoms.bg,
|
t.atoms.bg,
|
||||||
{
|
{paddingTop},
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
},
|
|
||||||
headerMinimalShellTransform,
|
headerMinimalShellTransform,
|
||||||
]}
|
]}
|
||||||
onLayout={e => {
|
onLayout={e => {
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export function HomeScreen(props: Props) {
|
|||||||
|
|
||||||
if (preferences && pinnedFeedInfos && !isPinnedFeedsLoading) {
|
if (preferences && pinnedFeedInfos && !isPinnedFeedsLoading) {
|
||||||
return (
|
return (
|
||||||
<Layout.Screen testID="HomeScreen">
|
<Layout.Screen testID="HomeScreen" noInsetTop>
|
||||||
<HomeScreenReady
|
<HomeScreenReady
|
||||||
{...props}
|
{...props}
|
||||||
preferences={preferences}
|
preferences={preferences}
|
||||||
|
|||||||
Reference in New Issue
Block a user