From c959dc351fe174cc96d84d971f5d2072e9fbc7e7 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Sat, 14 Dec 2024 15:30:01 -0600
Subject: `ProfileFeed` cleanups (#7115)

* Clean up feed load state

* Fix feed info dialog load state
---
 src/screens/Profile/ProfileFeed/index.tsx | 21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

(limited to 'src/screens/Profile/ProfileFeed/index.tsx')

diff --git a/src/screens/Profile/ProfileFeed/index.tsx b/src/screens/Profile/ProfileFeed/index.tsx
index 7d48b5ac1..3a8686a7d 100644
--- a/src/screens/Profile/ProfileFeed/index.tsx
+++ b/src/screens/Profile/ProfileFeed/index.tsx
@@ -34,9 +34,12 @@ import {FAB} from '#/view/com/util/fab/FAB'
 import {Button} from '#/view/com/util/forms/Button'
 import {ListRef} from '#/view/com/util/List'
 import {LoadLatestBtn} from '#/view/com/util/load-latest/LoadLatestBtn'
-import {LoadingScreen} from '#/view/com/util/LoadingScreen'
+import {PostFeedLoadingPlaceholder} from '#/view/com/util/LoadingPlaceholder'
 import {Text} from '#/view/com/util/text/Text'
-import {ProfileFeedHeader} from '#/screens/Profile/components/ProfileFeedHeader'
+import {
+  ProfileFeedHeader,
+  ProfileFeedHeaderSkeleton,
+} from '#/screens/Profile/components/ProfileFeedHeader'
 import * as Layout from '#/components/Layout'
 
 type Props = NativeStackScreenProps<CommonNavigatorParams, 'ProfileFeed'>
@@ -92,12 +95,15 @@ export function ProfileFeedScreen(props: Props) {
   }
 
   return resolvedUri ? (
-    <Layout.Screen noInsetTop>
+    <Layout.Screen>
       <ProfileFeedScreenIntermediate feedUri={resolvedUri.uri} />
     </Layout.Screen>
   ) : (
     <Layout.Screen>
-      <LoadingScreen />
+      <Layout.Content>
+        <ProfileFeedHeaderSkeleton />
+        <PostFeedLoadingPlaceholder />
+      </Layout.Content>
     </Layout.Screen>
   )
 }
@@ -107,7 +113,12 @@ function ProfileFeedScreenIntermediate({feedUri}: {feedUri: string}) {
   const {data: info} = useFeedSourceInfoQuery({uri: feedUri})
 
   if (!preferences || !info) {
-    return <LoadingScreen />
+    return (
+      <Layout.Content>
+        <ProfileFeedHeaderSkeleton />
+        <PostFeedLoadingPlaceholder />
+      </Layout.Content>
+    )
   }
 
   return (
-- 
cgit 1.4.1

