mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-25 22:39:22 +00:00
Fix issue
This commit is contained in:
parent
f32ee89924
commit
88ea7e2431
@ -47,6 +47,7 @@ class AsyncScreenWidget extends StatefulWidget {
|
|||||||
class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
|
class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
|
||||||
bool error = false;
|
bool error = false;
|
||||||
bool ready = false;
|
bool ready = false;
|
||||||
|
bool didFirstLoad = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
@ -80,7 +81,7 @@ class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
|
|||||||
try {
|
try {
|
||||||
setState(() {
|
setState(() {
|
||||||
error = false;
|
error = false;
|
||||||
ready = widget.showOldDataWhileUpdating;
|
ready = widget.showOldDataWhileUpdating && didFirstLoad;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Call parent method
|
// Call parent method
|
||||||
@ -88,6 +89,7 @@ class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
|
|||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
ready = true;
|
ready = true;
|
||||||
|
didFirstLoad = true;
|
||||||
});
|
});
|
||||||
} catch (e, stack) {
|
} catch (e, stack) {
|
||||||
print(e);
|
print(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user