From 232b70278971a1a6a67867577359a6de99455689 Mon Sep 17 00:00:00 2001 From: DMzS <75044136+Domenic-MZS@users.noreply.github.com> Date: Sat, 29 Jun 2024 08:40:04 -0400 Subject: [PATCH] fix: Increase dashboard RefreshIndicator edge offset (#1859) --- lib/ui/views/home/home_view.dart | 4 +++- lib/ui/views/home/home_viewmodel.dart | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/ui/views/home/home_view.dart b/lib/ui/views/home/home_view.dart index 6e76ea3e..c9770861 100644 --- a/lib/ui/views/home/home_view.dart +++ b/lib/ui/views/home/home_view.dart @@ -21,7 +21,9 @@ class HomeView extends StatelessWidget { viewModelBuilder: () => locator(), 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: [ CustomSliverAppBar( diff --git a/lib/ui/views/home/home_viewmodel.dart b/lib/ui/views/home/home_viewmodel.dart index 65d47871..f9f4ec63 100644 --- a/lib/ui/views/home/home_viewmodel.dart +++ b/lib/ui/views/home/home_viewmodel.dart @@ -500,8 +500,8 @@ class HomeViewModel extends BaseViewModel { } Future forceRefresh(BuildContext context) async { - _managerAPI.clearAllData(); + await _managerAPI.clearAllData(); + await initialize(context); _toast.showBottom(t.homeView.refreshSuccess); - initialize(context); } }