mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-22 04:46:30 +02:00
Version 3.0.357
This commit is contained in:
parent
5980410182
commit
5c0b2e70c9
84 changed files with 1012 additions and 449 deletions
|
@ -26,6 +26,7 @@ using TINK.Settings;
|
|||
using TINK.View;
|
||||
using TINK.ViewModel.Bikes;
|
||||
using Xamarin.Forms;
|
||||
using Command = Xamarin.Forms.Command;
|
||||
|
||||
namespace TINK.ViewModel.FindBike
|
||||
{
|
||||
|
@ -79,6 +80,22 @@ namespace TINK.ViewModel.FindBike
|
|||
/// <summary> Holds the stations to get station names form station ids. </summary>
|
||||
private IEnumerable<IStation> Stations { get; }
|
||||
|
||||
/// <summary>
|
||||
/// True if ListView of Bikes is refreshing after user pulled;
|
||||
/// </summary>
|
||||
private bool _isRefreshing = false;
|
||||
public bool IsRefreshing
|
||||
{
|
||||
get { return _isRefreshing; }
|
||||
set
|
||||
{
|
||||
_isRefreshing = value;
|
||||
OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsRefreshing)));
|
||||
}
|
||||
}
|
||||
|
||||
public Command RefreshCommand { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs bike collection view model in case information about occupied bikes is available.
|
||||
/// </summary>
|
||||
|
@ -118,6 +135,17 @@ namespace TINK.ViewModel.FindBike
|
|||
};
|
||||
|
||||
Stations = stations ?? throw new ArgumentException(nameof(stations));
|
||||
|
||||
/// <summary>
|
||||
/// Holds what should be executed on pull to refresh
|
||||
/// </summary>
|
||||
RefreshCommand = new Command(async () => {
|
||||
|
||||
IsRefreshing = true;
|
||||
await OnAppearing();
|
||||
IsRefreshing = false;
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue