mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-21 04:26:29 +02:00
Version 3.0.357
This commit is contained in:
parent
5980410182
commit
5c0b2e70c9
84 changed files with 1012 additions and 449 deletions
|
@ -313,7 +313,7 @@ namespace TINK.ViewModel.Map
|
|||
var status = await PermissionsService.RequestAsync();
|
||||
}
|
||||
|
||||
IsRunning = true;
|
||||
IsProcessWithRunningProcessView = true;
|
||||
IsNavBarVisible = false;
|
||||
// Process map page.
|
||||
Polling = TinkApp.Polling;
|
||||
|
@ -332,11 +332,13 @@ namespace TINK.ViewModel.Map
|
|||
TinkApp.Stations = resultStationsAndBikes.Response.StationsAll;
|
||||
TinkApp.ResourceUrls = resultStationsAndBikes.GeneralData.ResourceUrls;
|
||||
|
||||
// Check if there is a message from COPRI ("merchant_message") to be shown to user.
|
||||
if (!string.IsNullOrEmpty(resultStationsAndBikes?.GeneralData?.MerchantMessage)
|
||||
&& !WasMerchantMessageAlreadyShown)
|
||||
{
|
||||
// Show COPRI message once.
|
||||
await ViewService.DisplayAlert(
|
||||
"Information",
|
||||
AppResources.MessageTitleInformation,
|
||||
resultStationsAndBikes.GeneralData.MerchantMessage,
|
||||
AppResources.MessageAnswerOk);
|
||||
WasMerchantMessageAlreadyShown = true;
|
||||
|
@ -404,7 +406,7 @@ namespace TINK.ViewModel.Map
|
|||
|
||||
Exception = resultStationsAndBikes.Exception;
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsProcessWithRunningProcessView = false;
|
||||
IsNavBarVisible = true;
|
||||
IsMapPageEnabled = true;
|
||||
}
|
||||
|
@ -412,7 +414,7 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
Log.ForContext<MapPageViewModel>().Error($"An error occurred showing bike stations page.\r\n{l_oException.Message}");
|
||||
|
||||
IsRunning = false;
|
||||
IsProcessWithRunningProcessView = false;
|
||||
IsNavBarVisible = true;
|
||||
|
||||
await ViewService.DisplayAlert(
|
||||
|
@ -541,7 +543,7 @@ namespace TINK.ViewModel.Map
|
|||
// User decided to give access to locations permissions.
|
||||
PermissionsService.OpenAppSettings();
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsProcessWithRunningProcessView = false;
|
||||
IsNavBarVisible = true;
|
||||
IsMapPageEnabled = true;
|
||||
}
|
||||
|
@ -782,22 +784,22 @@ namespace TINK.ViewModel.Map
|
|||
}
|
||||
|
||||
/// <summary> Used to block more than on copri requests at a given time.</summary>
|
||||
private bool isRunning = false;
|
||||
private bool isProcessWithRunningProcessView = false;
|
||||
|
||||
/// <summary>
|
||||
/// True if any action can be performed (request and cancel request)
|
||||
/// </summary>
|
||||
public bool IsRunning
|
||||
public bool IsProcessWithRunningProcessView
|
||||
{
|
||||
get => isRunning;
|
||||
get => isProcessWithRunningProcessView;
|
||||
set
|
||||
{
|
||||
if (value == isRunning)
|
||||
if (value == isProcessWithRunningProcessView)
|
||||
return;
|
||||
|
||||
Log.ForContext<MapPageViewModel>().Debug($"Switch value of {nameof(isRunning)} to {value}.");
|
||||
isRunning = value;
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsRunning)));
|
||||
Log.ForContext<MapPageViewModel>().Debug($"Switch value of {nameof(isProcessWithRunningProcessView)} to {value}.");
|
||||
isProcessWithRunningProcessView = value;
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(IsProcessWithRunningProcessView)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -900,7 +902,7 @@ namespace TINK.ViewModel.Map
|
|||
try
|
||||
{
|
||||
IsMapPageEnabled = false;
|
||||
IsRunning = true;
|
||||
IsProcessWithRunningProcessView = true;
|
||||
IsNavBarVisible = false;
|
||||
|
||||
Log.ForContext<MapPageViewModel>().Information($"Request to toggle to \"{selectedFilter}\".");
|
||||
|
@ -954,7 +956,7 @@ namespace TINK.ViewModel.Map
|
|||
}
|
||||
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsProcessWithRunningProcessView = false;
|
||||
IsNavBarVisible = true;
|
||||
IsMapPageEnabled = true;
|
||||
Log.ForContext<MapPageViewModel>().Information($"Toggle to \"{selectedFilter}\" done.");
|
||||
|
@ -963,7 +965,7 @@ namespace TINK.ViewModel.Map
|
|||
{
|
||||
Log.ForContext<MapPageViewModel>().Error("An error occurred switching view Cargobike/ Citybike.{}");
|
||||
ActionText = "";
|
||||
IsRunning = false;
|
||||
IsProcessWithRunningProcessView = false;
|
||||
IsNavBarVisible = true;
|
||||
|
||||
await ViewService.DisplayAlert(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue