1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 08:15:16 +00:00

Can update "allow posts from friends" setting

This commit is contained in:
2020-04-27 18:58:18 +02:00
parent 9e5decae61
commit 38c1474d2e
3 changed files with 24 additions and 7 deletions

View File

@ -25,14 +25,19 @@ class AsyncScreenWidget extends StatefulWidget {
/// Error message that will be shown in case of error
final String errorMessage;
/// Specify whether old data can be kept or not while updating this widget
final bool showOldDataWhileUpdating;
const AsyncScreenWidget({
Key key,
@required this.onReload,
@required this.onBuild,
@required this.errorMessage,
this.showOldDataWhileUpdating = false,
}) : assert(onReload != null),
assert(onBuild != null),
assert(errorMessage != null),
assert(showOldDataWhileUpdating != null),
super(key: key);
@override
@ -75,7 +80,7 @@ class AsyncScreenWidgetState extends SafeState<AsyncScreenWidget> {
try {
setState(() {
error = false;
ready = false;
ready = widget.showOldDataWhileUpdating;
});
// Call parent method