Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mob][photos] Enable gallery filmstrip for all users

ashil-pilotb6deea6afe29
diff --git a/mobile/apps/photos/lib/ui/viewer/file/detail_page.dart b/mobile/apps/photos/lib/ui/viewer/file/detail_page.dart
index 2c394caa91..2e09c4eac3 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/detail_page.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/detail_page.dart
@@ -134,7 +134,6 @@ class _DetailPageState extends State<DetailPage> {
super.initState();
_bottomControlsAdditionalInsetNotifier.value =
shouldShowGalleryFileViewerFilmstrip(
- isFeatureEnabled: isGalleryFileViewerFilmstripEnabled,
isEnabled: widget.config.showGalleryFilmstrip,
isMinimalistic: widget.config.mode == DetailPageMode.minimalistic,
isGuestView: false,
@@ -865,7 +864,6 @@ class _BodyState extends State<_Body> {
EnteFile? get _selectedFile => _fileAt(_selectedIndexNotifier.value);
bool get _shouldShowFilmstrip => shouldShowGalleryFileViewerFilmstrip(
- isFeatureEnabled: isGalleryFileViewerFilmstripEnabled,
isEnabled: widget.config.showGalleryFilmstrip,
isMinimalistic: widget.config.mode == DetailPageMode.minimalistic,
isGuestView: isGuestView,
diff --git a/mobile/apps/photos/lib/ui/viewer/file/gallery_file_viewer_filmstrip.dart b/mobile/apps/photos/lib/ui/viewer/file/gallery_file_viewer_filmstrip.dart
index 57b9a0207d..018aaaabad 100644
--- a/mobile/apps/photos/lib/ui/viewer/file/gallery_file_viewer_filmstrip.dart
+++ b/mobile/apps/photos/lib/ui/viewer/file/gallery_file_viewer_filmstrip.dart
@@ -6,7 +6,6 @@ import "package:hugeicons/hugeicons.dart";
import "package:photos/core/constants.dart";
import "package:photos/models/file/file.dart";
import "package:photos/models/file/file_type.dart";
-import "package:photos/service_locator.dart";
import "package:photos/theme/colors.dart" show strokeFaintDark;
import "package:photos/ui/viewer/file/file_viewer_filmstrip.dart";
import "package:photos/ui/viewer/file/file_viewer_filmstrip_event.dart";
@@ -19,21 +18,12 @@ abstract final class GalleryFileViewerFilmstripLayout {
FileViewerFilmstripLayout.height + upperContentGap;
}
-/// Keeps the filmstrip limited to internal users while it is being evaluated.
-bool get isGalleryFileViewerFilmstripEnabled => flagService.internalUser;
-
bool shouldShowGalleryFileViewerFilmstrip({
- required bool isFeatureEnabled,
required bool isEnabled,
required bool isMinimalistic,
required bool isGuestView,
required int itemCount,
-}) =>
- isFeatureEnabled &&
- isEnabled &&
- !isMinimalistic &&
- !isGuestView &&
- itemCount > 1;
+}) => isEnabled && !isMinimalistic && !isGuestView && itemCount > 1;
/// This widget returns [Positioned.fill], so its parent must be a [Stack].
class GalleryFileViewerFilmstripPreviewLayer extends StatelessWidget {
diff --git a/mobile/apps/photos/test/ui/viewer/file/detail_page_configuration_test.dart b/mobile/apps/photos/test/ui/viewer/file/detail_page_configuration_test.dart
index 63f0102e8e..0b10b453b1 100644
--- a/mobile/apps/photos/test/ui/viewer/file/detail_page_configuration_test.dart
+++ b/mobile/apps/photos/test/ui/viewer/file/detail_page_configuration_test.dart
@@ -20,29 +20,18 @@ void main() {
expect(galleryConfig.copyWith().showGalleryFilmstrip, isTrue);
});
- test("gallery filmstrip requires its flag and an eligible gallery", () {
+ test("gallery filmstrip requires an eligible gallery", () {
for (final scenario in [
(
name: "eligible gallery",
- isFeatureEnabled: true,
isEnabled: true,
isMinimalistic: false,
isGuestView: false,
itemCount: 2,
expected: true,
),
- (
- name: "feature flag disabled",
- isFeatureEnabled: false,
- isEnabled: true,
- isMinimalistic: false,
- isGuestView: false,
- itemCount: 2,
- expected: false,
- ),
(
name: "not opted in",
- isFeatureEnabled: true,
isEnabled: false,
isMinimalistic: false,
isGuestView: false,
@@ -51,7 +40,6 @@ void main() {
),
(
name: "minimalistic viewer",
- isFeatureEnabled: true,
isEnabled: true,
isMinimalistic: true,
isGuestView: false,
@@ -60,7 +48,6 @@ void main() {
),
(
name: "guest view",
- isFeatureEnabled: true,
isEnabled: true,
isMinimalistic: false,
isGuestView: true,
@@ -69,7 +56,6 @@ void main() {
),
(
name: "single file",
- isFeatureEnabled: true,
isEnabled: true,
isMinimalistic: false,
isGuestView: false,
@@ -79,7 +65,6 @@ void main() {
]) {
expect(
shouldShowGalleryFileViewerFilmstrip(
- isFeatureEnabled: scenario.isFeatureEnabled,
isEnabled: scenario.isEnabled,
isMinimalistic: scenario.isMinimalistic,
isGuestView: scenario.isGuestView,