From 04b4b6cbd18d6125b35fd3a6583928ec4947ec61 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Mon, 21 Oct 2024 17:39:32 +0530 Subject: [PATCH] [mob][photos] Remove method that would never be used --- .../lib/ui/account/delete_account_page.dart | 65 ------------------- 1 file changed, 65 deletions(-) diff --git a/mobile/lib/ui/account/delete_account_page.dart b/mobile/lib/ui/account/delete_account_page.dart index b40d71933d..950ceef976 100644 --- a/mobile/lib/ui/account/delete_account_page.dart +++ b/mobile/lib/ui/account/delete_account_page.dart @@ -13,9 +13,7 @@ import 'package:photos/ui/components/buttons/button_widget.dart'; import 'package:photos/ui/components/models/button_type.dart'; import 'package:photos/utils/crypto_util.dart'; import 'package:photos/utils/dialog_util.dart'; -import 'package:photos/utils/email_util.dart'; import "package:photos/utils/toast_util.dart"; -import "package:styled_text/styled_text.dart"; class DeleteAccountPage extends StatefulWidget { const DeleteAccountPage({ @@ -256,8 +254,6 @@ class _DeleteAccountPageState extends State { } if (deleteChallengeResponse.allowDelete) { await _delete(context, deleteChallengeResponse); - } else { - await _requestEmailForDeletion(context); } }, isDismissible: false, @@ -293,65 +289,4 @@ class _DeleteAccountPageState extends State { await showGenericErrorDialog(context: context, error: e); } } - - Future _requestEmailForDeletion(BuildContext context) async { - final AlertDialog alert = AlertDialog( - title: Text( - S.of(context).deleteAccount, - style: const TextStyle( - color: Colors.red, - ), - ), - content: StyledText( - text: - "${S.of(context).deleteEmailRequest}\n\n${S.of(context).deleteRequestSLAText}", - tags: { - 'warning': StyledTextTag( - style: TextStyle( - fontWeight: FontWeight.bold, - color: Colors.orange[300], - ), - ), - }, - ), - actions: [ - TextButton( - child: Text( - S.of(context).sendEmail, - style: const TextStyle( - color: Colors.red, - ), - ), - onPressed: () async { - Navigator.of(context, rootNavigator: true).pop('dialog'); - await sendEmail( - context, - to: 'account-deletion@ente.io', - subject: '[${S.of(context).deleteAccount}]', - ); - }, - ), - TextButton( - child: Text( - S.of(context).ok, - style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, - ), - ), - onPressed: () { - Navigator.of(context, rootNavigator: true).pop('dialog'); - }, - ), - ], - ); - - // ignore: unawaited_futures - showDialog( - useRootNavigator: false, - context: context, - builder: (BuildContext context) { - return alert; - }, - ); - } }