From 29329ee30365a489541572219786517169945e6e Mon Sep 17 00:00:00 2001 From: Eveldee Date: Sat, 27 Apr 2019 13:49:02 +0200 Subject: [PATCH] Add app refresh --- PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml | 6 ++++-- PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml index b1e45fa..4f614cd 100644 --- a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml +++ b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml @@ -11,13 +11,15 @@ - diff --git a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs index da6d6ed..e7a15e0 100644 --- a/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs +++ b/PlantBox.Client/PlantBox.Client/Forms/HomePage.xaml.cs @@ -48,5 +48,14 @@ namespace PlantBox.Client.Forms { } + + private async void ListView_Refreshing(object sender, EventArgs e) + { + var homeViewModel = (HomeViewModel)BindingContext; + + await Task.Run(() => homeViewModel.Plants = homeViewModel.LoadPlants(App.Settings.IDs)); + + List.EndRefresh(); + } } } \ No newline at end of file