Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Show 3 albums in a row and max 3 rows i.e _kOnEnteItemLimitCount = 9 (3*3)

Aman Raj Singh Mourya723511540ca3
diff --git a/mobile/lib/ui/collections/flex_grid_view.dart b/mobile/lib/ui/collections/flex_grid_view.dart
index 4114ff0493..c96d2e1c4e 100644
--- a/mobile/lib/ui/collections/flex_grid_view.dart
+++ b/mobile/lib/ui/collections/flex_grid_view.dart
@@ -10,8 +10,8 @@ class CollectionsFlexiGridViewWidget extends StatelessWidget {
Width changes dynamically with screen width such that we can fit 2 in one row.
Keep the width integral (center the albums to distribute excess pixels)
*/
- static const maxThumbnailWidth = 224.0;
- static const fixedGapBetweenAlbum = 8.0;
+ static const maxThumbnailWidth = 170.0;
+ static const fixedGapBetweenAlbum = 2.0;
static const minGapForHorizontalPadding = 8.0;
static const collectionItemsToPreload = 20;
@@ -25,7 +25,7 @@ class CollectionsFlexiGridViewWidget extends StatelessWidget {
const CollectionsFlexiGridViewWidget(
this.collections, {
- this.displayLimitCount = 10,
+ this.displayLimitCount = 9,
this.shrinkWrap = false,
this.tag = "",
super.key,
@@ -34,7 +34,7 @@ class CollectionsFlexiGridViewWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
final double screenWidth = MediaQuery.of(context).size.width;
- final int albumsCountInOneRow = max(screenWidth ~/ maxThumbnailWidth, 2);
+ final int albumsCountInOneRow = max(screenWidth ~/ maxThumbnailWidth, 3);
final double gapBetweenAlbums =
(albumsCountInOneRow - 1) * fixedGapBetweenAlbum;
// gapOnSizeOfAlbums will be
diff --git a/mobile/lib/ui/tabs/user_collections_tab.dart b/mobile/lib/ui/tabs/user_collections_tab.dart
index afc6178c24..6a46d92fc9 100644
--- a/mobile/lib/ui/tabs/user_collections_tab.dart
+++ b/mobile/lib/ui/tabs/user_collections_tab.dart
@@ -57,7 +57,7 @@ class _UserCollectionsTabState extends State<UserCollectionsTab>
leading: true,
);
- static const int _kOnEnteItemLimitCount = 10;
+ static const int _kOnEnteItemLimitCount = 9;
@override
void initState() {
super.initState();