瀏覽代碼

Renamed 'showNewChoiceDialog' to 'showChoiceDialog'

ashilkn 2 年之前
父節點
當前提交
2b1390a83d

+ 1 - 1
lib/ui/account/delete_account_page.dart

@@ -131,7 +131,7 @@ class DeleteAccountPage extends StatelessWidget {
     );
 
     if (hasAuthenticated) {
-      final choice = await showNewChoiceDialog(
+      final choice = await showChoiceDialog(
         context,
         title: 'Are you sure you want to delete your account?',
         body:

+ 2 - 2
lib/ui/account/password_reentry_page.dart

@@ -80,7 +80,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
           } on KeyDerivationError catch (e, s) {
             _logger.severe("Password verification failed", e, s);
             await dialog.hide();
-            final dialogChoice = await showNewChoiceDialog(
+            final dialogChoice = await showChoiceDialog(
               context,
               title: "Recreate password",
               body: "The current device is not powerful enough to verify your "
@@ -102,7 +102,7 @@ class _PasswordReentryPageState extends State<PasswordReentryPage> {
           } catch (e, s) {
             _logger.severe("Password verification failed", e, s);
             await dialog.hide();
-            final dialogChoice = await showNewChoiceDialog(
+            final dialogChoice = await showChoiceDialog(
               context,
               title: "Incorrect password",
               body: "Please try again",

+ 1 - 1
lib/ui/account/verify_recovery_page.dart

@@ -74,7 +74,7 @@ class _VerifyRecoveryPageState extends State<VerifyRecoveryPage> {
           "The recovery key you entered is not valid. Please make sure it "
           "contains 24 words, and check the spelling of each.\n\nIf you "
           "entered an older recovery code, make sure it is 64 characters long, and check each of them.";
-      final result = await showNewChoiceDialog(
+      final result = await showChoiceDialog(
         context,
         title: "Invalid key",
         body: errMessage,

+ 1 - 1
lib/ui/actions/collection/collection_sharing_actions.dart

@@ -142,7 +142,7 @@ class CollectionActions {
     Collection collection,
     User user,
   ) async {
-    final result = await showNewChoiceDialog(
+    final result = await showChoiceDialog(
       context,
       title: "Remove",
       body: "${user.email} will be removed",

+ 1 - 1
lib/ui/payment/child_subscription_widget.dart

@@ -118,7 +118,7 @@ class ChildSubscriptionWidget extends StatelessWidget {
   }
 
   Future<void> _leaveFamilyPlan(BuildContext context) async {
-    final choice = await showNewChoiceDialog(
+    final choice = await showChoiceDialog(
       context,
       title: "Leave family",
       body: "Are you sure that you want to leave the family plan?",

+ 3 - 3
lib/ui/payment/stripe_subscription_page.dart

@@ -344,7 +344,7 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
       onPressed: () async {
         bool confirmAction = false;
         if (isRenewCancelled) {
-          final choice = await showNewChoiceDialog(
+          final choice = await showChoiceDialog(
             context,
             title: title,
             body: "Are you sure you want to renew?",
@@ -352,7 +352,7 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
           );
           confirmAction = choice == ButtonAction.first;
         } else {
-          final choice = await showNewChoiceDialog(
+          final choice = await showChoiceDialog(
             context,
             title: title,
             body: "Are you sure you want to cancel?",
@@ -429,7 +429,7 @@ class _StripeSubscriptionPageState extends State<StripeSubscriptionPage> {
               String stripPurChaseAction = 'buy';
               if (_isStripeSubscriber && _hasActiveSubscription) {
                 // confirm if user wants to change plan or not
-                final result = await showNewChoiceDialog(
+                final result = await showChoiceDialog(
                   context,
                   title: "Confirm plan change",
                   body: "Are you sure you want to change your plan?",

+ 1 - 1
lib/ui/viewer/gallery/gallery_app_bar_widget.dart

@@ -138,7 +138,7 @@ class _GalleryAppBarWidgetState extends State<GalleryAppBarWidget> {
   }
 
   Future<dynamic> _leaveAlbum(BuildContext context) async {
-    final result = await showNewChoiceDialog(
+    final result = await showChoiceDialog(
       context,
       title: "Leave shared album",
       body: "You will leave the album, and it will stop being visible to you",

+ 3 - 3
lib/utils/delete_file_util.dart

@@ -246,7 +246,7 @@ Future<void> deleteFilesOnDeviceOnly(
 }
 
 Future<bool> deleteFromTrash(BuildContext context, List<File> files) async {
-  final result = await showNewChoiceDialog(
+  final result = await showChoiceDialog(
     context,
     title: "Delete permanently",
     body: "This action cannot be undone",
@@ -280,7 +280,7 @@ Future<bool> deleteFromTrash(BuildContext context, List<File> files) async {
 }
 
 Future<bool> emptyTrash(BuildContext context) async {
-  final result = await showNewChoiceDialog(
+  final result = await showChoiceDialog(
     context,
     title: "Empty trash",
     firstButtonLabel: "Empty",
@@ -463,7 +463,7 @@ Future<List<String>> _tryDeleteSharedMediaFiles(List<String> localIDs) {
 }
 
 Future<bool> shouldProceedWithDeletion(BuildContext context) async {
-  final choice = await showNewChoiceDialog(
+  final choice = await showChoiceDialog(
     context,
     title: "Are you sure?",
     body:

+ 1 - 1
lib/utils/dialog_util.dart

@@ -91,7 +91,7 @@ DialogWidget choiceDialog({
 }
 
 ///Will return null if dismissed by tapping outside
-Future<ButtonAction?> showNewChoiceDialog(
+Future<ButtonAction?> showChoiceDialog(
   BuildContext context, {
   required String title,
   String? body,

+ 1 - 1
lib/utils/email_util.dart

@@ -253,7 +253,7 @@ Future<String> _clientInfo() async {
 }
 
 void _showNoMailAppsDialog(BuildContext context, String toEmail) {
-  showNewChoiceDialog(
+  showChoiceDialog(
     context,
     icon: Icons.email_outlined,
     title: 'Please email us at $toEmail',