Ungate profile scroll fix (#3655)
parent
49b5d420e6
commit
fe9b3f0432
|
@ -5,7 +5,6 @@ export type Gate =
|
||||||
| 'disable_poll_on_discover_v2'
|
| 'disable_poll_on_discover_v2'
|
||||||
| 'hide_vertical_scroll_indicators'
|
| 'hide_vertical_scroll_indicators'
|
||||||
| 'new_gif_player'
|
| 'new_gif_player'
|
||||||
| 'new_profile_scroll_component'
|
|
||||||
| 'show_follow_back_label_v2'
|
| 'show_follow_back_label_v2'
|
||||||
| 'start_session_with_following_v2'
|
| 'start_session_with_following_v2'
|
||||||
| 'use_new_suggestions_endpoint'
|
| 'use_new_suggestions_endpoint'
|
||||||
|
|
|
@ -25,7 +25,6 @@ import {useAnalytics} from 'lib/analytics/analytics'
|
||||||
import {useSetTitle} from 'lib/hooks/useSetTitle'
|
import {useSetTitle} from 'lib/hooks/useSetTitle'
|
||||||
import {ComposeIcon2} from 'lib/icons'
|
import {ComposeIcon2} from 'lib/icons'
|
||||||
import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
|
import {CommonNavigatorParams, NativeStackScreenProps} from 'lib/routes/types'
|
||||||
import {useGate} from 'lib/statsig/statsig'
|
|
||||||
import {combinedDisplayName} from 'lib/strings/display-names'
|
import {combinedDisplayName} from 'lib/strings/display-names'
|
||||||
import {isInvalidHandle} from 'lib/strings/handles'
|
import {isInvalidHandle} from 'lib/strings/handles'
|
||||||
import {colors, s} from 'lib/styles'
|
import {colors, s} from 'lib/styles'
|
||||||
|
@ -143,7 +142,6 @@ function ProfileScreenLoaded({
|
||||||
const setMinimalShellMode = useSetMinimalShellMode()
|
const setMinimalShellMode = useSetMinimalShellMode()
|
||||||
const {openComposer} = useComposerControls()
|
const {openComposer} = useComposerControls()
|
||||||
const {screen, track} = useAnalytics()
|
const {screen, track} = useAnalytics()
|
||||||
const gate = useGate()
|
|
||||||
const {
|
const {
|
||||||
data: labelerInfo,
|
data: labelerInfo,
|
||||||
error: labelerError,
|
error: labelerError,
|
||||||
|
@ -317,21 +315,8 @@ function ProfileScreenLoaded({
|
||||||
// =
|
// =
|
||||||
|
|
||||||
const renderHeader = React.useCallback(() => {
|
const renderHeader = React.useCallback(() => {
|
||||||
if (gate('new_profile_scroll_component')) {
|
return (
|
||||||
return (
|
<ExpoScrollForwarderView scrollViewTag={scrollViewTag}>
|
||||||
<ExpoScrollForwarderView scrollViewTag={scrollViewTag}>
|
|
||||||
<ProfileHeader
|
|
||||||
profile={profile}
|
|
||||||
labeler={labelerInfo}
|
|
||||||
descriptionRT={hasDescription ? descriptionRT : null}
|
|
||||||
moderationOpts={moderationOpts}
|
|
||||||
hideBackButton={hideBackButton}
|
|
||||||
isPlaceholderProfile={showPlaceholder}
|
|
||||||
/>
|
|
||||||
</ExpoScrollForwarderView>
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
return (
|
|
||||||
<ProfileHeader
|
<ProfileHeader
|
||||||
profile={profile}
|
profile={profile}
|
||||||
labeler={labelerInfo}
|
labeler={labelerInfo}
|
||||||
|
@ -340,10 +325,9 @@ function ProfileScreenLoaded({
|
||||||
hideBackButton={hideBackButton}
|
hideBackButton={hideBackButton}
|
||||||
isPlaceholderProfile={showPlaceholder}
|
isPlaceholderProfile={showPlaceholder}
|
||||||
/>
|
/>
|
||||||
)
|
</ExpoScrollForwarderView>
|
||||||
}
|
)
|
||||||
}, [
|
}, [
|
||||||
gate,
|
|
||||||
scrollViewTag,
|
scrollViewTag,
|
||||||
profile,
|
profile,
|
||||||
labelerInfo,
|
labelerInfo,
|
||||||
|
|
Loading…
Reference in New Issue