Add profile loading shim (#1940)

This commit is contained in:
dan 2023-11-16 23:23:58 +00:00 committed by GitHub
parent 22df70b3cc
commit f89dc63801
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 22 deletions

View file

@ -1,5 +1,5 @@
import React, {useMemo} from 'react'
import {ActivityIndicator, StyleSheet, View} from 'react-native'
import {StyleSheet, View} from 'react-native'
import {useFocusEffect} from '@react-navigation/native'
import {AppBskyActorDefs, moderateProfile, ModerationOpts} from '@atproto/api'
import {msg} from '@lingui/macro'
@ -73,9 +73,11 @@ export const ProfileScreen = withAuthRequired(function ProfileScreenImpl({
if (isFetchingDid || isFetchingProfile || !moderationOpts) {
return (
<CenteredView>
<View style={s.p20}>
<ActivityIndicator size="large" />
</View>
<ProfileHeader
profile={null}
moderation={null}
isProfilePreview={true}
/>
</CenteredView>
)
}
@ -158,12 +160,6 @@ function ProfileScreenLoaded({
].filter(Boolean) as string[]
}, [showLikesTab, showFeedsTab, showListsTab])
/*
- todo
- feeds
- lists
*/
useFocusEffect(
React.useCallback(() => {
setMinimalShellMode(false)