Fix profile preview jump (#1693)

* Add top inset for profile preview to match target screen

* Avoid flicker by waiting for profile screen navigation

* Fix glimmer to align with the content

* A more reliable (but non-scientific) fix for the flash

* Lower the timeout
This commit is contained in:
dan 2023-10-13 20:10:15 +01:00 committed by GitHub
parent d5ccbd76d5
commit f447eaa669
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 18 deletions

View file

@ -9,7 +9,6 @@ import {useAnalytics} from 'lib/analytics/analytics'
import {ProfileHeader} from '../profile/ProfileHeader'
import {InfoCircleIcon} from 'lib/icons'
import {useNavigationState} from '@react-navigation/native'
import {isIOS} from 'platform/detection'
import {s} from 'lib/styles'
export const snapPoints = [520, '100%']
@ -36,11 +35,7 @@ export const Component = observer(function ProfilePreviewImpl({
return (
<View testID="profilePreview" style={[pal.view, s.flex1]}>
<View
style={[
styles.headerWrapper,
isLoading && isIOS && styles.headerPositionAdjust,
]}>
<View style={[styles.headerWrapper]}>
<ProfileHeader
view={model}
hideBackButton
@ -70,10 +65,6 @@ const styles = StyleSheet.create({
headerWrapper: {
height: 440,
},
headerPositionAdjust: {
// HACK align the header for the profilescreen transition -prf
paddingTop: 23,
},
hintWrapper: {
height: 80,
},