This commit is contained in:
DMzS 2024-04-28 23:40:36 +02:00 committed by GitHub
commit da79901639
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 3 deletions

View File

@ -20,7 +20,9 @@ class HomeView extends StatelessWidget {
viewModelBuilder: () => locator<HomeViewModel>(),
builder: (context, model, child) => Scaffold(
body: RefreshIndicator(
onRefresh: () => model.forceRefresh(context),
edgeOffset: 110.0,
displacement: 10.0,
onRefresh: () async => await model.forceRefresh(context),
child: CustomScrollView(
slivers: <Widget>[
CustomSliverAppBar(

View File

@ -492,8 +492,8 @@ class HomeViewModel extends BaseViewModel {
}
Future<void> forceRefresh(BuildContext context) async {
_managerAPI.clearAllData();
await _managerAPI.clearAllData();
await initialize(context);
_toast.showBottom(t.homeView.refreshSuccess);
initialize(context);
}
}