ソースを参照

Handled error on deleting account

ashilkn 2 年 前
コミット
2e6bd52bdc
2 ファイル変更5 行追加1 行削除
  1. 1 1
      lib/services/user_service.dart
  2. 4 0
      lib/ui/account/delete_account_page.dart

+ 1 - 1
lib/services/user_service.dart

@@ -244,7 +244,7 @@ class UserService {
       }
     } catch (e) {
       _logger.severe(e);
-      showGenericErrorDialog(context);
+      rethrow;
     }
   }
 

+ 4 - 0
lib/ui/account/delete_account_page.dart

@@ -13,6 +13,7 @@ import 'package:photos/ui/components/button_widget.dart';
 import 'package:photos/ui/components/dialog_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';
 
@@ -187,6 +188,9 @@ class DeleteAccountPage extends StatelessWidget {
           ),
         ],
       );
+      if (choice == ButtonAction.error) {
+        showGenericErrorDialog(context);
+      }
       if (choice != ButtonAction.first) {
         return;
       }