Skip to content

armgit / ente

Public Imported from GitHub
0

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

Remove internal flag for native family management screens

ashilknba8fbd25520c
diff --git a/mobile/apps/photos/lib/l10n/intl_en.arb b/mobile/apps/photos/lib/l10n/intl_en.arb
index bdcd72fb28..5e201cd9e5 100644
--- a/mobile/apps/photos/lib/l10n/intl_en.arb
+++ b/mobile/apps/photos/lib/l10n/intl_en.arb
@@ -1549,8 +1549,6 @@
"description": "Label of confirm button to add a new custom radius to the radius selector of a location tag"
},
"setRadius": "Set radius",
- "familyPlanPortalTitle": "Family",
- "familyPlanOverview": "Add 5 family members to your existing plan without paying extra.\n\nEach member gets their own private space, and cannot see each other's files unless they're shared.\n\nFamily plans are available to customers who have a paid Ente subscription.\n\nSubscribe now to get started!",
"androidBiometricHint": "Verify identity",
"@androidBiometricHint": {
"description": "Hint message advising the user how to authenticate with biometrics. It is used on Android side. Maximum 60 characters."
diff --git a/mobile/apps/photos/lib/services/account/billing_service.dart b/mobile/apps/photos/lib/services/account/billing_service.dart
index 8d69d3bdc7..8441fce3bc 100644
--- a/mobile/apps/photos/lib/services/account/billing_service.dart
+++ b/mobile/apps/photos/lib/services/account/billing_service.dart
@@ -9,11 +9,8 @@ import 'package:logging/logging.dart';
import "package:photos/gateways/billing/billing_gateway.dart";
import 'package:photos/gateways/billing/models/billing_plan.dart';
import 'package:photos/gateways/billing/models/subscription.dart';
-import "package:photos/generated/l10n.dart";
import 'package:photos/models/user_details.dart';
import "package:photos/service_locator.dart";
-import 'package:photos/services/account/user_service.dart';
-import 'package:photos/ui/common/web_page.dart';
import 'package:photos/ui/family/family_plan_page.dart';
import 'package:photos/utils/dialog_util.dart';
@@ -136,11 +133,6 @@ class BillingService {
_isOnSubscriptionPage = isOnSubscriptionPage;
}
- // Temporary rollout gate for the native family flow. When the native
- // experience is ready for all users, remove this getter and the legacy
- // launcher below, then call _launchNativeFamilyPortal directly.
- bool get _useNativeFamilyFlow => flagService.internalUser;
-
Future<void> launchFamilyPortal(
BuildContext context,
UserDetails userDetails, {
@@ -148,81 +140,16 @@ class BillingService {
bool refreshOnOpen = true,
}) async {
try {
- if (_useNativeFamilyFlow) {
- await _launchNativeFamilyPortal(
- context,
- userDetails,
+ await routeToPage(
+ context,
+ FamilyPlanPage(
+ initialUserDetails: userDetails,
popOnFreeAdvertViewPlans: popOnFreeAdvertViewPlans,
refreshOnOpen: refreshOnOpen,
- );
- return;
- }
-
- await _launchLegacyFamilyPortal(context, userDetails);
- } catch (e) {
- await showGenericErrorDialog(context: context, error: e);
- }
- }
-
- Future<void> _launchNativeFamilyPortal(
- BuildContext context,
- UserDetails userDetails, {
- required bool popOnFreeAdvertViewPlans,
- required bool refreshOnOpen,
- }) {
- return routeToPage(
- context,
- FamilyPlanPage(
- initialUserDetails: userDetails,
- popOnFreeAdvertViewPlans: popOnFreeAdvertViewPlans,
- refreshOnOpen: refreshOnOpen,
- ),
- );
- }
-
- Future<void> _launchLegacyFamilyPortal(
- BuildContext context,
- UserDetails userDetails,
- ) async {
- if (userDetails.subscription.productID == freeProductID &&
- !userDetails.hasPaidAddon()) {
- await showErrorDialog(
- context,
- AppLocalizations.of(context).familyPlans,
- AppLocalizations.of(context).familyPlanOverview,
- );
- return;
- }
-
- final dialog = createProgressDialog(
- context,
- AppLocalizations.of(context).pleaseWait,
- isDismissible: true,
- );
- await dialog.show();
- var isDialogHidden = false;
- try {
- final familyExist = userDetails.isPartOfFamily();
- final url = await UserService.instance.getFamilyPortalUrl(familyExist);
- await dialog.hide();
- isDialogHidden = true;
- if (!context.mounted) {
- return;
- }
- await Navigator.of(context).push(
- MaterialPageRoute(
- builder: (context) {
- return WebPage(
- AppLocalizations.of(context).familyPlanPortalTitle,
- url,
- );
- },
),
);
- } finally {
- if (!isDialogHidden) {
- await dialog.hide();
- }
+ } catch (e) {
+ await showGenericErrorDialog(context: context, error: e);
}
}
}
diff --git a/mobile/apps/photos/lib/services/account/user_service.dart b/mobile/apps/photos/lib/services/account/user_service.dart
index 9a98ce3933..a0474551f8 100644
--- a/mobile/apps/photos/lib/services/account/user_service.dart
+++ b/mobile/apps/photos/lib/services/account/user_service.dart
@@ -1158,18 +1158,6 @@ class UserService {
}
}
- Future<String> getFamilyPortalUrl(bool familyExist) async {
- try {
- final responseData = await _gateway.getFamiliesToken();
- final String url = responseData["familyUrl"] ?? kFamilyUrl;
- final String jwtToken = responseData["familiesToken"];
- return '$url?token=$jwtToken&isFamilyCreated=$familyExist';
- } catch (e, s) {
- _logger.severe("failed to fetch families token", e, s);
- rethrow;
- }
- }
-
Future<void> _saveConfiguration(dynamic response) async {
final responseData = response is Map ? response : response.data as Map?;
if (responseData == null) {
diff --git a/mobile/apps/photos/scripts/internal_changes.txt b/mobile/apps/photos/scripts/internal_changes.txt
index baf34d2cd5..505c2d9a1b 100644
--- a/mobile/apps/photos/scripts/internal_changes.txt
+++ b/mobile/apps/photos/scripts/internal_changes.txt
@@ -6,10 +6,10 @@ Latest changes:
- Neeraj: Guard shared favorites removal resolution
- Neeraj: Handle incomplete signup login errors with localized error copy
- Neeraj: Improve motion photo video detection in rust layer
+- Ashil, Setal: Native family management screens
- Prateek: 16 KB page size fix
Still behind internal flag:
-- Ashil, Setal (I): Native family management screens
- Amrithesh: (I) ML/Pet recognition [Indexing]
- Amrithesh: (I) QR code detection
- Laurens: (I) Clip text encoding in rust