Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

mobile: fix top bar item page width and count

Ammar Ahmedf1fc16671348
diff --git a/apps/mobile/app/components/properties/items.tsx b/apps/mobile/app/components/properties/items.tsx
index ebbadcc44..a79afbce9 100644
--- a/apps/mobile/app/components/properties/items.tsx
+++ b/apps/mobile/app/components/properties/items.tsx
@@ -326,8 +326,9 @@ export const Items = ({
const getTopBarItemChunksOfFour = () => {
const chunks = [];
- for (let i = 0; i < topBarItems.length; i += 5) {
- chunks.push(topBarItems.slice(i, i + 5));
+ const itemCount = shouldShrink ? 4 : 5;
+ for (let i = 0; i < topBarItems.length; i += itemCount) {
+ chunks.push(topBarItems.slice(i, i + itemCount));
}
return chunks;
};
@@ -375,10 +376,7 @@ export const Items = ({
flexDirection: "row",
paddingHorizontal: DefaultAppStyles.GAP,
gap: 5,
- /**
- * ((columnItemWidth + gap) * noOfItems) - padding
- */
- width: (columnItemWidth + 5) * 5 - 12
+ width: width
}}
>
{item.map(renderTopBarItem)}