diff --git a/package.json b/package.json index 780917e370..435a1f06ca 100644 --- a/package.json +++ b/package.json @@ -266,6 +266,7 @@ "webpack-bundle-analyzer": "^4.10.1" }, "resolutions": { + "@atproto/lexicon": "0.4.6-next.5", "@expo/image-utils": "0.6.3", "@react-native/babel-preset": "0.76.1", "@react-native/normalize-colors": "0.76.1", diff --git a/src/components/KnownFollowers.tsx b/src/components/KnownFollowers.tsx index b5c501039c..1e7cf448a7 100644 --- a/src/components/KnownFollowers.tsx +++ b/src/components/KnownFollowers.tsx @@ -10,6 +10,7 @@ import {UserAvatar} from '#/view/com/util/UserAvatar' import {atoms as a, useTheme} from '#/alf' import {Link, LinkProps} from '#/components/Link' import {Text} from '#/components/Typography' +import * as bsky from '#/types/bsky' const AVI_SIZE = 30 const AVI_SIZE_SMALL = 20 @@ -33,7 +34,7 @@ export function KnownFollowers({ onLinkPress, minimal, }: { - profile: AppBskyActorDefs.ProfileViewDetailed + profile: bsky.profile.AnyProfileView moderationOpts: ModerationOpts onLinkPress?: LinkProps['onPress'] minimal?: boolean @@ -77,7 +78,7 @@ function KnownFollowersInner({ onLinkPress, minimal, }: { - profile: AppBskyActorDefs.ProfileViewDetailed + profile: bsky.profile.AnyProfileView moderationOpts: ModerationOpts cachedKnownFollowers: AppBskyActorDefs.KnownFollowers onLinkPress?: LinkProps['onPress'] diff --git a/src/view/com/profile/ProfileCard.tsx b/src/view/com/profile/ProfileCard.tsx index 4eb5d4859c..4139000591 100644 --- a/src/view/com/profile/ProfileCard.tsx +++ b/src/view/com/profile/ProfileCard.tsx @@ -77,6 +77,7 @@ export function ProfileCard({ showKnownFollowers && shouldShowKnownFollowers(profile.viewer?.knownFollowers) && moderationOpts + const hasDescription = 'description' in profile return ( {renderButton(profile)} ) : undefined} - {atp.profile.isView(profile) || atp.profile.isDetailedView(profile) ? ( - <> - {profile.description || knownFollowersVisible ? ( - - {profile.description ? ( - - {profile.description as string} - - ) : null} - {knownFollowersVisible ? ( - - {atp.profile.isDetailedView(profile) && ( - - )} - - ) : null} + {hasDescription || knownFollowersVisible ? ( + + {hasDescription && profile.description ? ( + + {profile.description as string} + + ) : null} + {knownFollowersVisible ? ( + + ) : null} - + ) : null} ) diff --git a/yarn.lock b/yarn.lock index 4eeb36bee7..d70e408596 100644 --- a/yarn.lock +++ b/yarn.lock @@ -282,7 +282,7 @@ multiformats "^9.9.0" zod "^3.23.8" -"@atproto/lexicon@0.4.6-next.5", "@atproto/lexicon@^0.4.6-next.5": +"@atproto/lexicon@0.4.6-next.5", "@atproto/lexicon@^0.4.4", "@atproto/lexicon@^0.4.5", "@atproto/lexicon@^0.4.6-next.5": version "0.4.6-next.5" resolved "https://registry.yarnpkg.com/@atproto/lexicon/-/lexicon-0.4.6-next.5.tgz#433a941cf8902afec15135f70cf2cbed37c35406" integrity sha512-Id1atQ1rZ3dUGAUyBcauD+zs5lGHSmoAlC1Kwb2DEvkaWMv3oTXUjtdQxyb0/Kz4YaFI+nxLLRH9NBO+BipG+w== @@ -293,28 +293,6 @@ multiformats "^9.9.0" zod "^3.23.8" -"@atproto/lexicon@^0.4.4": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@atproto/lexicon/-/lexicon-0.4.4.tgz#0d97314bb57b693b76f2495fa5e02872469dd93a" - integrity sha512-QFEmr3rpj/RoAmfX9ALU/asBG/rsVtQZnw+9nOB1/AuIwoxXd+ZyndR6lVUc2+DL4GEjl6W2yvBru5xbQIZWyA== - dependencies: - "@atproto/common-web" "^0.3.1" - "@atproto/syntax" "^0.3.1" - iso-datestring-validator "^2.2.2" - multiformats "^9.9.0" - zod "^3.23.8" - -"@atproto/lexicon@^0.4.5": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@atproto/lexicon/-/lexicon-0.4.5.tgz#4fcf3731193c674286e9e8d677bbab5dd530b817" - integrity sha512-fljWqMGKn+XWtTprBcS3F1hGBREnQYh6qYHv2sjENucc7REms1gtmZXSerB9N6pVeHVNOnXiILdukeAcic5OEw== - dependencies: - "@atproto/common-web" "^0.3.2" - "@atproto/syntax" "^0.3.1" - iso-datestring-validator "^2.2.2" - multiformats "^9.9.0" - zod "^3.23.8" - "@atproto/oauth-provider@^0.2.10": version "0.2.10" resolved "https://registry.yarnpkg.com/@atproto/oauth-provider/-/oauth-provider-0.2.10.tgz#f9820d7f82c33d3b74e81a75873f50e1e654b901"