mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 03:27:29 +02:00
Version 3.0.270
This commit is contained in:
parent
67999ef4ae
commit
e0c75d5b37
81 changed files with 812 additions and 474 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue