Version 3.0.360

This commit is contained in:
Anja 2023-02-22 14:03:35 +01:00
parent 5c0b2e70c9
commit faf68061f4
160 changed files with 2114 additions and 1932 deletions

View file

@ -26,6 +26,8 @@ using TINK.Services.BluetoothLock;
using TINK.Repository;
using TINK.Services.Geolocation;
using TINK.Model.State;
using TINK.ViewModel.Bikes;
#if !TRYNOTBACKSTYLE
@ -308,7 +310,7 @@ namespace TINK.ViewModel.Map
try
{
//Request Location Permission on iOS
if(DeviceInfo.Platform == DevicePlatform.iOS)
if (DeviceInfo.Platform == DevicePlatform.iOS)
{
var status = await PermissionsService.RequestAsync();
}
@ -336,11 +338,17 @@ namespace TINK.ViewModel.Map
if (!string.IsNullOrEmpty(resultStationsAndBikes?.GeneralData?.MerchantMessage)
&& !WasMerchantMessageAlreadyShown)
{
// Show COPRI message once.
await ViewService.DisplayAlert(
AppResources.MessageTitleInformation,
resultStationsAndBikes.GeneralData.MerchantMessage,
AppResources.MessageAnswerOk);
// Context switch should not be required because code is called from GUI thread
// but a xf-issue requires call (see issue #594).
TinkApp.PostAction( async (x) =>
{
// Show COPRI message once.
await ViewService.DisplayAlert(
AppResources.MessageTitleInformation,
resultStationsAndBikes.GeneralData.MerchantMessage,
AppResources.MessageAnswerOk);
}, null);
WasMerchantMessageAlreadyShown = true;
}
@ -405,7 +413,7 @@ namespace TINK.ViewModel.Map
}
Exception = resultStationsAndBikes.Exception;
ActionText = "";
ActionText = string.Empty;
IsProcessWithRunningProcessView = false;
IsNavBarVisible = true;
IsMapPageEnabled = true;
@ -542,7 +550,7 @@ namespace TINK.ViewModel.Map
{
// User decided to give access to locations permissions.
PermissionsService.OpenAppSettings();
ActionText = "";
ActionText = string.Empty;
IsProcessWithRunningProcessView = false;
IsNavBarVisible = true;
IsMapPageEnabled = true;
@ -655,7 +663,7 @@ namespace TINK.ViewModel.Map
{
try
{
Log.ForContext<MapPageViewModel>().Information($"User taped station {selectedStationId}.");
Log.ForContext<MapPageViewModel>().Information($"User taped station {selectedStationId}.");
// Lock action to prevent multiple instances of "BikeAtStation" being opened.
IsMapPageEnabled = false;
@ -673,13 +681,13 @@ namespace TINK.ViewModel.Map
await ViewService.PushAsync(ViewTypes.BikesAtStation);
IsMapPageEnabled = true;
ActionText = "";
ActionText = string.Empty;
}
}
catch (Exception exception)
{
IsMapPageEnabled = true;
ActionText = "";
ActionText = string.Empty;
Log.ForContext<MapPageViewModel>().Error("Fehler beim Öffnen der Ansicht \"Fahrräder an Station\" aufgetreten. {Exception}", exception);
await ViewService.DisplayAlert(
@ -851,11 +859,6 @@ namespace TINK.ViewModel.Map
return Exception.GetShortErrorInfoText(TinkApp.IsReportLevelVerbose);
}
if (!IsConnected)
{
return AppResources.ActivityTextConnectionStateOffline;
}
return ActionText ?? string.Empty;
}
}
@ -955,7 +958,7 @@ namespace TINK.ViewModel.Map
// Excpetions are handled insde update task;
}
ActionText = "";
ActionText = string.Empty;
IsProcessWithRunningProcessView = false;
IsNavBarVisible = true;
IsMapPageEnabled = true;
@ -964,7 +967,7 @@ namespace TINK.ViewModel.Map
catch (Exception l_oException)
{
Log.ForContext<MapPageViewModel>().Error("An error occurred switching view Cargobike/ Citybike.{}");
ActionText = "";
ActionText = string.Empty;
IsProcessWithRunningProcessView = false;
IsNavBarVisible = true;