π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Fix friend profile post loading skeleton
Anand Baburajan20b3fa429f94
diff --git a/web/apps/space/src/pages/app/friends/[spaceId].tsx b/web/apps/space/src/pages/app/friends/[spaceId].tsxindex a16998af73..d7e3a99e47 100644--- a/web/apps/space/src/pages/app/friends/[spaceId].tsx+++ b/web/apps/space/src/pages/app/friends/[spaceId].tsx@@ -51,18 +51,23 @@ const Page: React.FC = () => {const [loadedPostsSpaceId, setLoadedPostsSpaceId] = useState<string>();const [selectedProfile, setSelectedProfile] = useState(selectedFriend);const [posts, setPosts] = useState<SpaceProfilePost[]>([]);+ const selectedFriendSpaceId = selectedFriend?.spaceId;+ const hasLoadedPostsForSelectedFriend =+ loadedPostsSpaceId == selectedFriendSpaceId;const postGroups = useMemo(- () => profilePostGroupsFromPosts(posts),- [posts],+ () =>+ hasLoadedPostsForSelectedFriend+ ? profilePostGroupsFromPosts(posts)+ : [],+ [hasLoadedPostsForSelectedFriend, posts],);- const selectedFriendSpaceId = selectedFriend?.spaceId;const showProfileLoading = Boolean(selectedFriendSpaceId &&(isProfileLoading || loadedProfileSpaceId != selectedFriendSpaceId),);const showPostsLoading = Boolean(selectedFriendSpaceId &&- (isPostsLoading || loadedPostsSpaceId != selectedFriendSpaceId),+ (isPostsLoading || !hasLoadedPostsForSelectedFriend),);const currentSelectedProfile =selectedProfile?.spaceId == selectedFriendSpaceId@@ -210,6 +215,7 @@ const Page: React.FC = () => {onLoadPostImage={loadCurrentSpacePostAssetURL}onReplyToPost={replyToCurrentPost}onSetPostLiked={setCurrentPostLiked}+ showPostLoadingSkeleton={false}/></>);