Version 3.0.270

This commit is contained in:
Oliver Hauff 2022-01-04 18:59:16 +01:00
parent 67999ef4ae
commit e0c75d5b37
81 changed files with 812 additions and 474 deletions

View file

@ -34,6 +34,10 @@ namespace TINK.ViewModel.Map
{
public class MapPageViewModel : INotifyPropertyChanged
{
/// <summary> True if message was already shown to user. </summary>
private static bool WasMerchantMessageAlreadyShown { get; set; } = false;
/// <summary> Holds the count of custom icons availalbe.</summary>
private const int CUSTOM_ICONS_COUNT = 30;
@ -322,6 +326,16 @@ namespace TINK.ViewModel.Map
TinkApp.Stations = resultStationsAndBikes.Response.StationsAll;
if (!string.IsNullOrEmpty(resultStationsAndBikes?.GeneralData?.MerchantMessage)
&& !WasMerchantMessageAlreadyShown)
{
await ViewService.DisplayAlert(
"Information",
resultStationsAndBikes.GeneralData.MerchantMessage,
"OK");
WasMerchantMessageAlreadyShown = true;
}
await SetStationsOnMap(resultStationsAndBikes.Response.StationsAll);
await HandleAuthCookieNotDefinedException(resultStationsAndBikes.Exception);
@ -677,7 +691,7 @@ namespace TINK.ViewModel.Map
foreach (var stationId in stationsId)
{
// Get color of given station.
var bikesAtStation = bikesAll.Where(x => x.CurrentStation == stationId).ToList();
var bikesAtStation = bikesAll.Where(x => x.StationId == stationId).ToList();
if (bikesAtStation.FirstOrDefault(x => x.State.Value != Model.State.InUseStateEnum.Disposable) != null)
{
// There is at least one requested or booked bike