From c60efc6b8b73b170ca628750a3a7c01882ea93b3 Mon Sep 17 00:00:00 2001 From: Daniela Henkel Date: Thu, 20 Nov 2025 01:53:01 +0100 Subject: [PATCH] fix edit profile avatar and edit image screen not being square --- src/screens/Profile/Header/EditProfileDialog.tsx | 5 ++++- src/view/com/util/UserAvatar.tsx | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/screens/Profile/Header/EditProfileDialog.tsx b/src/screens/Profile/Header/EditProfileDialog.tsx index 6fcd3a488..2d73f7f52 100644 --- a/src/screens/Profile/Header/EditProfileDialog.tsx +++ b/src/screens/Profile/Header/EditProfileDialog.tsx @@ -9,6 +9,7 @@ import {cleanError} from '#/lib/strings/errors' import {useWarnMaxGraphemeCount} from '#/lib/strings/helpers' import {logger} from '#/logger' import {type ImageMeta} from '#/state/gallery' +import {useEnableSquareAvatars} from '#/state/preferences/enable-square-avatars' import {useProfileUpdateMutation} from '#/state/queries/profile' import {ErrorMessage} from '#/view/com/util/error/ErrorMessage' import * as Toast from '#/view/com/util/Toast' @@ -133,6 +134,8 @@ function DialogInner({ userAvatar !== profile.avatar || userBanner !== profile.banner + const enableSquareAvatars = useEnableSquareAvatars() + useEffect(() => { setDirty(dirty) }, [dirty, setDirty]) @@ -286,7 +289,7 @@ function DialogInner({ width: 84, height: 84, borderWidth: 2, - borderRadius: 42, + borderRadius: enableSquareAvatars ? 11 : 42, borderColor: t.atoms.bg.backgroundColor, }, ]}> diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx index 3bc60e141..bd2834a7d 100644 --- a/src/view/com/util/UserAvatar.tsx +++ b/src/view/com/util/UserAvatar.tsx @@ -365,7 +365,9 @@ let EditableUserAvatar = ({ const sheetWrapper = useSheetWrapper() const highQualityImages = useHighQualityImages() - const circular = type !== 'algo' && type !== 'list' + const enableSquareAvatars = useEnableSquareAvatars() + + const circular = type !== 'algo' && type !== 'list' && !enableSquareAvatars const aviStyle = useMemo(() => { if (!circular) { -- 2.51.2