Skip to content

Commit 09a5526

Browse files
author
darkhan.nausharipov
committed
addException in deleteAccount (apache#25255)
1 parent a2f43bf commit 09a5526

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

learning/tour-of-beam/frontend/lib/auth/notifier.dart

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class AuthNotifier extends ChangeNotifier {
4444
try {
4545
await FirebaseAuth.instance.signInWithPopup(authProvider);
4646
} on Exception catch (e) {
47-
// TODO(nausharipov) review: why toasts are not shown in ToB?
4847
PlaygroundComponents.toastNotifier.addException(e);
4948
}
5049
}
@@ -54,7 +53,11 @@ class AuthNotifier extends ChangeNotifier {
5453
}
5554

5655
Future<void> deleteAccount() async {
57-
await client.postDeleteUserProgress();
58-
await FirebaseAuth.instance.currentUser?.delete();
56+
try {
57+
await client.postDeleteUserProgress();
58+
await FirebaseAuth.instance.currentUser?.delete();
59+
} on Exception catch (e) {
60+
PlaygroundComponents.toastNotifier.addException(e);
61+
}
5962
}
6063
}

0 commit comments

Comments
 (0)