about summary refs log tree commit diff
path: root/src/view/screens/Profile.tsx
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2023-11-21 22:42:30 +0000
committerGitHub <noreply@github.com>2023-11-21 22:42:30 +0000
commit4c4ba553bdc4029e78eaf2ccf0f9df12e41a1b01 (patch)
treee97890d72da1fd0a2c10cc501f530a04dae3157a /src/view/screens/Profile.tsx
parentf18b9b32b0d296c8d19dc06956699f95c0af9be2 (diff)
downloadvoidsky-4c4ba553bdc4029e78eaf2ccf0f9df12e41a1b01.tar.zst
Shadow refactoring and improvements (#1959)
* Make shadow a type-only concept

* Prevent unnecessary init state recalc

* Use derived state instead of effects

* Batch emitter updates

* Use object first seen time instead of dataUpdatedAt

* Stop threading dataUpdatedAt through

* Use same value consistently
Diffstat (limited to 'src/view/screens/Profile.tsx')
-rw-r--r--src/view/screens/Profile.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/view/screens/Profile.tsx b/src/view/screens/Profile.tsx
index 5411bc044..7b25e012c 100644
--- a/src/view/screens/Profile.tsx
+++ b/src/view/screens/Profile.tsx
@@ -57,7 +57,6 @@ export const ProfileScreen = withAuthRequired(
     } = useResolveDidQuery(name)
     const {
       data: profile,
-      dataUpdatedAt,
       error: profileError,
       refetch: refetchProfile,
       isFetching: isFetchingProfile,
@@ -100,7 +99,6 @@ export const ProfileScreen = withAuthRequired(
       return (
         <ProfileScreenLoaded
           profile={profile}
-          dataUpdatedAt={dataUpdatedAt}
           moderationOpts={moderationOpts}
           hideBackButton={!!route.params.hideBackButton}
         />
@@ -125,16 +123,14 @@ export const ProfileScreen = withAuthRequired(
 
 function ProfileScreenLoaded({
   profile: profileUnshadowed,
-  dataUpdatedAt,
   moderationOpts,
   hideBackButton,
 }: {
   profile: AppBskyActorDefs.ProfileViewDetailed
-  dataUpdatedAt: number
   moderationOpts: ModerationOpts
   hideBackButton: boolean
 }) {
-  const profile = useProfileShadow(profileUnshadowed, dataUpdatedAt)
+  const profile = useProfileShadow(profileUnshadowed)
   const {currentAccount} = useSession()
   const setMinimalShellMode = useSetMinimalShellMode()
   const {openComposer} = useComposerControls()