Tweak rendering of top headers so they always appear even during load (#4982)
Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
parent
8651f31ebb
commit
8cddce5f30
12 changed files with 120 additions and 130 deletions
|
@ -1,5 +1,4 @@
|
|||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
|
@ -7,9 +6,12 @@ import {useFocusEffect} from '@react-navigation/native'
|
|||
import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types'
|
||||
import {makeRecordUri} from '#/lib/strings/url-helpers'
|
||||
import {useSetMinimalShellMode} from '#/state/shell'
|
||||
import {isWeb} from 'platform/detection'
|
||||
import {PostLikedBy as PostLikedByComponent} from '#/view/com/post-thread/PostLikedBy'
|
||||
import {ViewHeader} from '#/view/com/util/ViewHeader'
|
||||
import {CenteredView} from 'view/com/util/Views'
|
||||
import {atoms as a} from '#/alf'
|
||||
import {ListHeaderDesktop} from '#/components/Lists'
|
||||
|
||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostLikedBy'>
|
||||
export const PostLikedByScreen = ({route}: Props) => {
|
||||
|
@ -25,9 +27,10 @@ export const PostLikedByScreen = ({route}: Props) => {
|
|||
)
|
||||
|
||||
return (
|
||||
<View style={a.flex_1}>
|
||||
<ViewHeader title={_(msg`Liked By`)} />
|
||||
<CenteredView style={a.h_full_vh} sideBorders={true}>
|
||||
<ListHeaderDesktop title={_(msg`Liked By`)} />
|
||||
<ViewHeader title={_(msg`Liked By`)} showBorder={!isWeb} />
|
||||
<PostLikedByComponent uri={uri} />
|
||||
</View>
|
||||
</CenteredView>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
|
@ -7,9 +6,12 @@ import {useFocusEffect} from '@react-navigation/native'
|
|||
import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types'
|
||||
import {makeRecordUri} from '#/lib/strings/url-helpers'
|
||||
import {useSetMinimalShellMode} from '#/state/shell'
|
||||
import {isWeb} from 'platform/detection'
|
||||
import {PostQuotes as PostQuotesComponent} from '#/view/com/post-thread/PostQuotes'
|
||||
import {ViewHeader} from '#/view/com/util/ViewHeader'
|
||||
import {CenteredView} from 'view/com/util/Views'
|
||||
import {atoms as a} from '#/alf'
|
||||
import {ListHeaderDesktop} from '#/components/Lists'
|
||||
|
||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostQuotes'>
|
||||
export const PostQuotesScreen = ({route}: Props) => {
|
||||
|
@ -25,9 +27,10 @@ export const PostQuotesScreen = ({route}: Props) => {
|
|||
)
|
||||
|
||||
return (
|
||||
<View style={a.flex_1}>
|
||||
<ViewHeader title={_(msg`Quotes`)} />
|
||||
<CenteredView style={a.h_full_vh} sideBorders={true}>
|
||||
<ListHeaderDesktop title={_(msg`Quotes`)} />
|
||||
<ViewHeader title={_(msg`Quotes`)} showBorder={!isWeb} />
|
||||
<PostQuotesComponent uri={uri} />
|
||||
</View>
|
||||
</CenteredView>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import React from 'react'
|
||||
import {View} from 'react-native'
|
||||
import {msg} from '@lingui/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useFocusEffect} from '@react-navigation/native'
|
||||
|
@ -7,9 +6,12 @@ import {useFocusEffect} from '@react-navigation/native'
|
|||
import {CommonNavigatorParams, NativeStackScreenProps} from '#/lib/routes/types'
|
||||
import {makeRecordUri} from '#/lib/strings/url-helpers'
|
||||
import {useSetMinimalShellMode} from '#/state/shell'
|
||||
import {isWeb} from 'platform/detection'
|
||||
import {PostRepostedBy as PostRepostedByComponent} from '#/view/com/post-thread/PostRepostedBy'
|
||||
import {ViewHeader} from '#/view/com/util/ViewHeader'
|
||||
import {CenteredView} from 'view/com/util/Views'
|
||||
import {atoms as a} from '#/alf'
|
||||
import {ListHeaderDesktop} from '#/components/Lists'
|
||||
|
||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'PostRepostedBy'>
|
||||
export const PostRepostedByScreen = ({route}: Props) => {
|
||||
|
@ -25,9 +27,10 @@ export const PostRepostedByScreen = ({route}: Props) => {
|
|||
)
|
||||
|
||||
return (
|
||||
<View style={a.flex_1}>
|
||||
<ViewHeader title={_(msg`Reposted By`)} />
|
||||
<CenteredView style={a.h_full_vh} sideBorders={true}>
|
||||
<ListHeaderDesktop title={_(msg`Reposted By`)} />
|
||||
<ViewHeader title={_(msg`Reposted By`)} showBorder={!isWeb} />
|
||||
<PostRepostedByComponent uri={uri} />
|
||||
</View>
|
||||
</CenteredView>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue