From 3c06522a4a8d4902c06add2d5f2fcc41a6364c4e Mon Sep 17 00:00:00 2001 From: "xan.lol" Date: Thu, 30 Apr 2026 00:58:57 -0700 Subject: [PATCH] fix: square avatar on profile placeholder & bottombar avatar outline (mobile web) --- src/screens/Profile/Header/index.tsx | 13 ++++++++++++- src/view/com/util/UserAvatar.tsx | 4 +--- src/view/shell/bottom-bar/BottomBarStyles.tsx | 2 +- src/view/shell/bottom-bar/BottomBarWeb.tsx | 6 +++++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/screens/Profile/Header/index.tsx b/src/screens/Profile/Header/index.tsx index b064ea329..0e0657f43 100644 --- a/src/screens/Profile/Header/index.tsx +++ b/src/screens/Profile/Header/index.tsx @@ -17,6 +17,7 @@ import { import {useIsFocused} from '@react-navigation/native' import {sanitizeHandle} from '#/lib/strings/handles' +import {useEnableSquareAvatars} from '#/state/preferences/enable-square-avatars' import {useProfileShadow} from '#/state/cache/profile-shadow' import {useModerationOpts} from '#/state/preferences/moderation-opts' import {useSetLightStatusBar} from '#/state/shell/light-status-bar' @@ -37,6 +38,7 @@ import { let ProfileHeaderLoading = (_props: {}): React.ReactNode => { const t = useTheme() + const enableSquareAvatars = useEnableSquareAvatars() return ( @@ -45,8 +47,13 @@ let ProfileHeaderLoading = (_props: {}): React.ReactNode => { t.atoms.bg, {borderColor: t.atoms.bg.backgroundColor}, styles.avi, + enableSquareAvatars && styles.aviSquare, ]}> - + @@ -229,6 +236,9 @@ const styles = StyleSheet.create({ borderRadius: 47, borderWidth: 2, }, + aviSquare: { + borderRadius: 10, + }, content: { paddingTop: 12, paddingHorizontal: 16, @@ -239,5 +249,6 @@ const styles = StyleSheet.create({ marginLeft: 'auto', }, br45: {borderRadius: 45}, + br8: {borderRadius: 8}, br50: {borderRadius: 50}, }) diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index 1dc3d0156..619286509 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -110,8 +110,6 @@ let DefaultAvatar = ({ const finalShape = overrideShape ?? (type === 'user' ? 'circle' : 'square') const t = useTheme() - const enableSquareAvatars = useEnableSquareAvatars() - const aviStyle = useMemo(() => { if (finalShape === 'square') { return {borderRadius: size > 32 ? 8 : 3, overflow: 'hidden'} as const @@ -206,7 +204,7 @@ let DefaultAvatar = ({ fill="none" stroke="none" style={aviStyle}> - {enableSquareAvatars ? ( + {finalShape === 'square' ? ( -- 2.51.2