π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
internal flag for rituals
laurenspriemeeff652c5fb2
diff --git a/mobile/apps/photos/lib/services/activity/activity_service.dart b/mobile/apps/photos/lib/services/activity/activity_service.dartindex c2ab641372..2cb641d2ca 100644--- a/mobile/apps/photos/lib/services/activity/activity_service.dart+++ b/mobile/apps/photos/lib/services/activity/activity_service.dart@@ -34,6 +34,15 @@ class ActivityService {Future<void> init() async {_preferences = ServiceLocator.instance.prefs;+ if (!flagService.ritualsFlag) {+ stateNotifier.value = const ActivityState(+ loading: false,+ summary: null,+ rituals: [],+ error: null,+ );+ return;+ }_filesUpdatedSubscription =Bus.instance.on<FilesUpdatedEvent>().listen((event) {_scheduleRefresh();@@ -55,6 +64,15 @@ class ActivityService {}Future<void> refresh() async {+ if (!flagService.ritualsFlag) {+ stateNotifier.value = const ActivityState(+ loading: false,+ summary: null,+ rituals: [],+ error: null,+ );+ return;+ }try {stateNotifier.value = stateNotifier.value.copyWith(loading: true,diff --git a/mobile/apps/photos/lib/ui/activity/activity_banner.dart b/mobile/apps/photos/lib/ui/activity/activity_banner.dartindex f8ab390535..8a582d4ad1 100644--- a/mobile/apps/photos/lib/ui/activity/activity_banner.dart+++ b/mobile/apps/photos/lib/ui/activity/activity_banner.dart@@ -10,6 +10,9 @@ class ActivityBanner extends StatelessWidget {@overrideWidget build(BuildContext context) {+ if (!flagService.ritualsFlag) {+ return const SizedBox.shrink();+ }return ValueListenableBuilder<ActivityState>(valueListenable: activityService.stateNotifier,builder: (context, state, _) {diff --git a/mobile/apps/photos/lib/ui/activity/activity_screen.dart b/mobile/apps/photos/lib/ui/activity/activity_screen.dartindex fbcb00feaf..3289e50976 100644--- a/mobile/apps/photos/lib/ui/activity/activity_screen.dart+++ b/mobile/apps/photos/lib/ui/activity/activity_screen.dart@@ -44,6 +44,25 @@ class _ActivityScreenState extends State<ActivityScreen> {@overrideWidget build(BuildContext context) {+ final ritualsEnabled = flagService.ritualsFlag;+ if (!ritualsEnabled) {+ return Scaffold(+ appBar: AppBar(+ title: const Text("Rituals"),+ centerTitle: false,+ ),+ body: Center(+ child: Padding(+ padding: const EdgeInsets.symmetric(horizontal: 24),+ child: Text(+ "Rituals are currently limited to internal users.",+ style: Theme.of(context).textTheme.bodyMedium,+ textAlign: TextAlign.center,+ ),+ ),+ ),+ );+ }return Scaffold(appBar: AppBar(title: const Text("Rituals"),diff --git a/mobile/apps/photos/lib/ui/activity/ritual_camera_page.dart b/mobile/apps/photos/lib/ui/activity/ritual_camera_page.dartindex 710db37ebf..5af4df69d5 100644--- a/mobile/apps/photos/lib/ui/activity/ritual_camera_page.dart+++ b/mobile/apps/photos/lib/ui/activity/ritual_camera_page.dart@@ -1,6 +1,7 @@import "package:flutter/material.dart";import "package:photos/models/collection/collection.dart";import "package:photos/models/collection/collection_items.dart";+import "package:photos/service_locator.dart";import "package:photos/services/collections_service.dart";import "package:photos/ui/activity/activity_screen.dart";import "package:photos/ui/viewer/gallery/collection_page.dart";@@ -18,6 +19,19 @@ class RitualCameraPage extends StatelessWidget {@overrideWidget build(BuildContext context) {+ if (!flagService.ritualsFlag) {+ return Scaffold(+ appBar: AppBar(+ title: const Text("Ritual capture"),+ ),+ body: const Center(+ child: Padding(+ padding: EdgeInsets.symmetric(horizontal: 24),+ child: Text("Rituals are currently limited to internal users."),+ ),+ ),+ );+ }return Scaffold(appBar: AppBar(title: const Text("Ritual capture"),diff --git a/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart b/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dartindex 216c5c634a..1393b9802a 100644--- a/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart+++ b/mobile/apps/photos/plugins/ente_feature_flag/lib/src/service.dart@@ -87,6 +87,8 @@ class FlagService {bool get facesTimeline => internalUser;+ bool get ritualsFlag => internalUser;+bool hasSyncedAccountFlags() {return _prefs.containsKey("remote_flags");}