Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Remove collage internal gating and simplify layouts

Neeraj Guptadd408a29f912
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_creator_page.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_creator_page.dart
index 05fcbf4f54..db9c6f71b0 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_creator_page.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_creator_page.dart
@@ -5,7 +5,6 @@ import "package:logging/logging.dart";
import "package:photo_manager/photo_manager.dart";
import "package:photos/generated/l10n.dart";
import 'package:photos/models/file/file.dart';
-import "package:photos/service_locator.dart";
import "package:photos/services/sync/sync_service.dart";
import "package:photos/ui/notification/toast.dart";
import "package:photos/ui/tools/collage/collage_app_bar.dart";
@@ -38,7 +37,6 @@ class _CollageCreatorPageState extends State<CollageCreatorPage> {
WidgetsToImageController? _controller;
bool _isSaving = false;
VoidCallback? _clearSwapSelection;
- late final bool _enableInternalLayouts = flagService.internalUser;
void _onControllerReady(WidgetsToImageController controller) {
setState(() {
@@ -125,7 +123,6 @@ class _CollageCreatorPageState extends State<CollageCreatorPage> {
widget.files[1],
onControllerReady: _onControllerReady,
onSelectionClearSetter: (fn) => _clearSwapSelection = fn,
- enableExtendedLayouts: _enableInternalLayouts,
);
break;
case 3:
@@ -135,7 +132,6 @@ class _CollageCreatorPageState extends State<CollageCreatorPage> {
widget.files[2],
onControllerReady: _onControllerReady,
onSelectionClearSetter: (fn) => _clearSwapSelection = fn,
- enableExtendedLayouts: _enableInternalLayouts,
);
break;
case 4:
@@ -146,7 +142,6 @@ class _CollageCreatorPageState extends State<CollageCreatorPage> {
widget.files[3],
onControllerReady: _onControllerReady,
onSelectionClearSetter: (fn) => _clearSwapSelection = fn,
- enableExtendedLayouts: _enableInternalLayouts,
);
break;
case 5:
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart
index 307cb799c2..fd4ccb391f 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_four_items.dart
@@ -22,13 +22,11 @@ class CollageWithFourItems extends StatefulWidget {
this.fourth, {
super.key,
this.onControllerReady,
- this.enableExtendedLayouts = false,
this.onSelectionClearSetter,
});
final EnteFile first, second, third, fourth;
final ValueChanged<WidgetsToImageController>? onControllerReady;
- final bool enableExtendedLayouts;
final ValueChanged<VoidCallback>? onSelectionClearSetter;
@override
@@ -114,28 +112,26 @@ class _CollageWithFourItemsState extends State<CollageWithFourItems>
});
},
),
- if (widget.enableExtendedLayouts)
- CollageLayoutIconButton(
- child: ThirdVariantIcon(
- isActive: _variant == Variant.third,
- ),
- onTap: () {
- setState(() {
- _variant = Variant.third;
- });
- },
+ CollageLayoutIconButton(
+ child: ThirdVariantIcon(
+ isActive: _variant == Variant.third,
),
- if (widget.enableExtendedLayouts)
- CollageLayoutIconButton(
- child: FourthVariantIcon(
- isActive: _variant == Variant.fourth,
- ),
- onTap: () {
- setState(() {
- _variant = Variant.fourth;
- });
- },
+ onTap: () {
+ setState(() {
+ _variant = Variant.third;
+ });
+ },
+ ),
+ CollageLayoutIconButton(
+ child: FourthVariantIcon(
+ isActive: _variant == Variant.fourth,
),
+ onTap: () {
+ setState(() {
+ _variant = Variant.fourth;
+ });
+ },
+ ),
],
);
}
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart
index ef8d27ec1b..4b9ab29513 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_three_items.dart
@@ -22,13 +22,11 @@ class CollageWithThreeItems extends StatefulWidget {
this.third, {
super.key,
this.onControllerReady,
- this.enableExtendedLayouts = false,
this.onSelectionClearSetter,
});
final EnteFile first, second, third;
final ValueChanged<WidgetsToImageController>? onControllerReady;
- final bool enableExtendedLayouts;
final ValueChanged<VoidCallback>? onSelectionClearSetter;
@override
@@ -126,28 +124,26 @@ class _CollageWithThreeItemsState extends State<CollageWithThreeItems>
});
},
),
- if (widget.enableExtendedLayouts)
- CollageLayoutIconButton(
- child: FourthVariantIcon(
- isActive: _variant == Variant.fourth,
- ),
- onTap: () {
- setState(() {
- _variant = Variant.fourth;
- });
- },
+ CollageLayoutIconButton(
+ child: FourthVariantIcon(
+ isActive: _variant == Variant.fourth,
),
- if (widget.enableExtendedLayouts)
- CollageLayoutIconButton(
- child: FifthVariantIcon(
- isActive: _variant == Variant.fifth,
- ),
- onTap: () {
- setState(() {
- _variant = Variant.fifth;
- });
- },
+ onTap: () {
+ setState(() {
+ _variant = Variant.fourth;
+ });
+ },
+ ),
+ CollageLayoutIconButton(
+ child: FifthVariantIcon(
+ isActive: _variant == Variant.fifth,
),
+ onTap: () {
+ setState(() {
+ _variant = Variant.fifth;
+ });
+ },
+ ),
],
);
}
diff --git a/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart b/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart
index 850f2e807f..ae7ba40bdb 100644
--- a/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart
+++ b/mobile/apps/photos/lib/ui/tools/collage/collage_with_two_items.dart
@@ -19,13 +19,11 @@ class CollageWithTwoItems extends StatefulWidget {
this.second, {
super.key,
this.onControllerReady,
- this.enableExtendedLayouts = false,
this.onSelectionClearSetter,
});
final EnteFile first, second;
final ValueChanged<WidgetsToImageController>? onControllerReady;
- final bool enableExtendedLayouts;
final ValueChanged<VoidCallback>? onSelectionClearSetter;
@override
@@ -108,17 +106,16 @@ class _CollageWithTwoItemsState extends State<CollageWithTwoItems>
});
},
),
- if (widget.enableExtendedLayouts)
- CollageLayoutIconButton(
- child: ThirdVariantIcon(
- isActive: _variant == Variant.third,
- ),
- onTap: () {
- setState(() {
- _variant = Variant.third;
- });
- },
+ CollageLayoutIconButton(
+ child: ThirdVariantIcon(
+ isActive: _variant == Variant.third,
),
+ onTap: () {
+ setState(() {
+ _variant = Variant.third;
+ });
+ },
+ ),
],
);
}
diff --git a/mobile/apps/photos/scripts/internal_changes.txt b/mobile/apps/photos/scripts/internal_changes.txt
index 635a34c76e..34f1deb9b2 100644
--- a/mobile/apps/photos/scripts/internal_changes.txt
+++ b/mobile/apps/photos/scripts/internal_changes.txt
@@ -1,3 +1,5 @@
+- Neeraj: (i) Show incoming photos in feed
+- Neeraj: Remove internal-user gating for extended collage layouts
- Ashil: Fix likes on someone else's photo coming up as your in feed + improvements in feed (ownership aware copies for comments and replies)
- Ashil: Improve free up device space experience on iOS if backedup shared iCloud albums exists
- Ashil: Social notification improvements