Version 3.0.255

This commit is contained in:
Oliver Hauff 2021-11-07 19:42:59 +01:00
parent db9c288584
commit 5a26bf273b
1495 changed files with 159465 additions and 5060 deletions

View file

@ -15,11 +15,11 @@ using MonkeyCache.FileStore;
using Plugin.Connectivity;
using System.Threading;
using TINK.Model.Settings;
using Plugin.Permissions;
using TINK.Services.BluetoothLock.Crypto;
using TINK.Model.Services.Geolocation;
using TINK.Services;
using System.Threading.Tasks;
using TINK.Services.Permissions;
#if ARENDI
using Arendi.BleLibrary.Local;
#endif
@ -124,8 +124,12 @@ namespace TINK
IStore store = null;
var lastVersion = JsonSettingsDictionary.GetAppVersion(settingsJSON);
if (lastVersion > new Version(3, 0, 173))
if (lastVersion > new Version(3, 0, 250))
{
// App versions newer than 3.0.173 stored geolocation service in configuration.
// Force a switch to typeof(GeolocationService) for versions < 3.0.251
GeolocationServicesContainer.SetActive(settings.ActiveGeolocationService);
}
store = new Store();
@ -263,10 +267,25 @@ namespace TINK
return LogEventLevel.Error;
}
/// <summary>
/// Holds the permission service instance.
/// </summary>
private static ILocationPermission _PermissionsService = null;
/// <summary>
/// Service to manage permissions (location) of the app.
/// </summary>
public static Plugin.Permissions.Abstractions.IPermissions PermissionsService => CrossPermissions.Current;
public static ILocationPermission PermissionsService
{
get
{
if (_PermissionsService != null)
return _PermissionsService;
_PermissionsService = new Services.Permissions.Plugin.Permissions();
return _PermissionsService;
}
}
/// <summary>
/// Service to manage bluetooth stack.
@ -277,11 +296,11 @@ namespace TINK
/// Service container to manage geolocation services.
/// </summary>
public static IServicesContainer<IGeolocation> GeolocationServicesContainer { get; }
= new Services.ServicesContainerMutable<Model.Services.Geolocation.IGeolocation>(
new HashSet<Model.Services.Geolocation.IGeolocation> {
= new ServicesContainerMutable<IGeolocation>(
new HashSet<IGeolocation> {
new LastKnownGeolocationService(DependencyService.Get<IGeolodationDependent>()),
new SimulatedGeolocationService(DependencyService.Get<IGeolodationDependent>()),
new GeolocationService(DependencyService.Get<IGeolodationDependent>()) },
typeof(LastKnownGeolocationService).FullName);
Model.Settings.Settings.DefaultLocationService.FullName);
}
}

View file

@ -14,6 +14,10 @@
<Frame>
<StackLayout
Orientation="Vertical">
<Label
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding StationDetailText}"/>
<ListView
x:Name="BikesAtStationListView"
SelectionMode="None"

View file

@ -46,9 +46,9 @@ namespace TINK.View.Contact
public async Task<bool> DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel)
=> await App.Current.MainPage.DisplayAlert(title, $"{message}\r\nDetails:\r\n{details}", accept, cancel);
#if USEMASTERDETAIL || USEFLYOUT
public void ShowPage(ViewTypes p_oType, string p_strTitle = null)
=> throw new NotImplementedException();
#if USEFLYOUT
public void ShowPage(ViewTypes p_oType, string title = null)
=> NavigationMasterDetail.ShowPage(p_oType.GetViewType(), title);
#else
/// <summary> Shows a page.</summary>
/// <param name="route">Route of the page to show.</param>

View file

@ -5,8 +5,6 @@ using TINK.View.MasterDetail;
#endif
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace TINK.View.Contact
{

View file

@ -15,6 +15,7 @@
Placeholder="Fahrrad-Nummer bitte hier eingeben"
IsVisible="{Binding IsSelectBikeVisible}"
MaxLength="10"
CursorPosition="0"
Text="{Binding BikeIdUserInput}">
</Entry>
<Button

View file

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.Root.RootPageFlyout"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="TINK.View.Root.RootPageFlyout"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:local="clr-namespace:TINK.View"
IconImageSource="Icon-Small@2x"
Title="sharee.bike">
IconImageSource="menu"
Title="sharee.bike">
<StackLayout>
<ListView x:Name="MenuItemsListView"
SeparatorVisibility="None"

View file

@ -142,7 +142,7 @@ namespace TINK.ViewModel.Root
if (!(theme is ITheme active))
return "sharee.bike";
return $"sharee.bike{(!string.IsNullOrEmpty(active.OperatorInfo) ? ($"\r\n{active.OperatorInfo}") : string.Empty)}";
return !string.IsNullOrEmpty(active.OperatorInfo) ? $"{active.OperatorInfo}" : "sharee.bike";
}
/// <summary>