Skip to content

Commit

Permalink
fix: Increase dashboard RefreshIndicator edge offset (#1859)
Browse files Browse the repository at this point in the history
  • Loading branch information
Domenic-MZS authored Jun 29, 2024
1 parent 694f2a9 commit 232b702
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/ui/views/home/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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(
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/views/home/home_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,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);
}
}

0 comments on commit 232b702

Please sign in to comment.