Account recovery is triggered once via a memoized Future, and errors are not swallowed inside the provider
This commit is contained in:
@@ -36,6 +36,17 @@ class AccountLoader extends StatelessWidget {
|
||||
});
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
if (provider.restoreFuture == null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
provider.restoreIfPossible().catchError((error, stack) {
|
||||
debugPrint('Account restore failed: $error');
|
||||
});
|
||||
});
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
}
|
||||
|
||||
if (provider.isLoading) return const Center(child: CircularProgressIndicator());
|
||||
if (provider.account == null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => navigateAndReplace(context, Pages.login));
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
|
||||
Reference in New Issue
Block a user