Account state now survives reload before redirecting to login #40

Closed
protuberanets wants to merge 3 commits from SEND003 into main
2 changed files with 6 additions and 7 deletions
Showing only changes of commit dfbf36bf04 - Show all commits

3
.gitignore vendored
View File

@@ -8,4 +8,5 @@ devtools_options.yaml
untranslated.txt
generate_protos.sh
update_dep.sh
.vscode/
.vscode/
GeneratedPluginRegistrant.swift

View File

@@ -17,14 +17,12 @@ class AccountLoader extends StatelessWidget {
@override
Widget build(BuildContext context) => Consumer<AccountProvider>(builder: (context, provider, _) {
if (provider.account != null) return child;
Review

ТЕСТ

ТЕСТ
if (!provider.restoreAttempted) {
WidgetsBinding.instance.addPostFrameCallback((_) => provider.restoreIfPossible());
return const Center(child: CircularProgressIndicator());
if (provider.account != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
});
Review

а зачем тут пустой вызов?

а зачем тут пустой вызов?
return child;
}
if (provider.isLoading) return const Center(child: CircularProgressIndicator());
if (provider.error != null) {
WidgetsBinding.instance.addPostFrameCallback((_) {
postNotifyUserOfErrorX(