Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Adjust Space grid avatars and portrait crops

Anand Baburajan9b2931298446
diff --git a/web/apps/space/src/components/PostGrid.tsx b/web/apps/space/src/components/PostGrid.tsx
index 2a73965cad..695e8ce535 100644
--- a/web/apps/space/src/components/PostGrid.tsx
+++ b/web/apps/space/src/components/PostGrid.tsx
@@ -1,5 +1,6 @@
import { Box } from "@mui/material";
import React from "react";
+import { spacePostFrameAspectRatio } from "utils/post-photos";
import { postPhotoLayout, profilePhotoGap } from "utils/profile-photo-layout";
interface PostGridItem {
@@ -50,9 +51,7 @@ export const SpacePostGrid = <Item extends PostGridItem>({
id: item.id,
aspectRatio:
item.frameAspectRatio ??
- (item.width && item.height
- ? item.width / item.height
- : 1),
+ spacePostFrameAspectRatio([item]),
})),
width,
previousLayout,
diff --git a/web/apps/space/src/components/PostTile.tsx b/web/apps/space/src/components/PostTile.tsx
index 060acc1843..d607840b0c 100644
--- a/web/apps/space/src/components/PostTile.tsx
+++ b/web/apps/space/src/components/PostTile.tsx
@@ -289,7 +289,7 @@ export const SpacePostTile: React.FC<SpacePostTileProps> = ({
>
<SpacePostAvatar
ready={!isAvatarPending && decodedAvatar.ready}
- size={22}
+ size={26}
src={
decodedAvatar.failed ? undefined : decodedAvatar.src
}
diff --git a/web/apps/space/src/screens/HomeScreen.tsx b/web/apps/space/src/screens/HomeScreen.tsx
index fe3741d2e3..971121196d 100644
--- a/web/apps/space/src/screens/HomeScreen.tsx
+++ b/web/apps/space/src/screens/HomeScreen.tsx
@@ -2322,9 +2322,8 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
return {
...item,
id: String(item.postId),
- frameAspectRatio: photo.video
- ? spacePostFrameAspectRatio([photo])
- : undefined,
+ frameAspectRatio:
+ spacePostFrameAspectRatio([photo]),
};
})}
renderTile={(item, index, flexGrow) => {