1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2024-11-25 22:39:22 +00:00

Fix issue

This commit is contained in:
Pierre HUBERT 2020-04-27 19:08:19 +02:00
parent f32ee89924
commit 88ea7e2431

View File

@ -47,6 +47,7 @@ class AsyncScreenWidget extends StatefulWidget {
class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
bool error = false;
bool ready = false;
bool didFirstLoad = false;
@override
void initState() {
@ -80,7 +81,7 @@ class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
try {
setState(() {
error = false;
ready = widget.showOldDataWhileUpdating;
ready = widget.showOldDataWhileUpdating && didFirstLoad;
});
// Call parent method
@ -88,6 +89,7 @@ class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
setState(() {
ready = true;
didFirstLoad = true;
});
} catch (e, stack) {
print(e);