mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Version 3.0.255
This commit is contained in:
parent
db9c288584
commit
5a26bf273b
1495 changed files with 159465 additions and 5060 deletions
|
@ -18,10 +18,9 @@ using TINK.Services.BluetoothLock;
|
|||
using TINK.Model.Services.Geolocation;
|
||||
using TINK.ViewModel.Bikes;
|
||||
using TINK.Services.BluetoothLock.Tdo;
|
||||
using Plugin.Permissions.Abstractions;
|
||||
using Plugin.BLE.Abstractions.Contracts;
|
||||
using TINK.MultilingualResources;
|
||||
using Plugin.Permissions;
|
||||
using TINK.Services.Permissions;
|
||||
using TINK.Model.Station;
|
||||
using TINK.Model.Device;
|
||||
|
||||
|
@ -59,7 +58,7 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
/// <param name="viewService">Interface to actuate methodes on GUI.</param>
|
||||
public BikesAtStationPageViewModel(
|
||||
User user,
|
||||
IPermissions permissions,
|
||||
ILocationPermission permissions,
|
||||
IBluetoothLE bluetoothLE,
|
||||
string runtimPlatform,
|
||||
IStation selectedStation,
|
||||
|
@ -81,6 +80,10 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
Title = string.Format(m_oStation?.StationName != null
|
||||
? m_oStation.StationName
|
||||
: string.Empty);
|
||||
|
||||
StationDetailText = string.Format(m_oStation?.Id != null
|
||||
? string.Format(AppResources.MarkingBikesAtStationStationId, m_oStation.Id)
|
||||
: string.Empty); ;
|
||||
|
||||
CollectionChanged += (sender, eventargs) =>
|
||||
{
|
||||
|
@ -121,8 +124,8 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
public string ContactSupportHintText
|
||||
=> string.Format(AppResources.MarkingContactSupport, m_oStation?.OperatorData?.Name ?? "Operator");
|
||||
|
||||
/// <summary> Returns if info about the fact that user did not request or book any bikes is visible or not.<summary>
|
||||
/// Gets message that logged in user has not booked any bikes.
|
||||
/// <summary>
|
||||
/// Returns if info about the fact that user did not request or book any bikes is visible or not.
|
||||
/// </summary>
|
||||
public bool IsNoBikesAtStationVisible
|
||||
{
|
||||
|
@ -207,6 +210,9 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary> Returns detailed info about the station (station id).<summary>
|
||||
public string StationDetailText { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when page is shown.
|
||||
/// Starts update process.
|
||||
|
@ -233,10 +239,6 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
.Select(x => x.LockInfo)
|
||||
.ToList();
|
||||
|
||||
Title = string.Format(m_oStation?.StationName != null
|
||||
? m_oStation.StationName
|
||||
: string.Empty);
|
||||
|
||||
if (LockService is ILocksServiceFake serviceFake)
|
||||
{
|
||||
serviceFake.UpdateSimulation(bikesAtStation);
|
||||
|
@ -248,12 +250,12 @@ namespace TINK.ViewModel.BikesAtStation
|
|||
if (bikesAtStation.GetLockIt().Count > 0
|
||||
&& RuntimePlatform == Device.Android)
|
||||
{
|
||||
var status = await PermissionsService.CheckPermissionStatusAsync<LocationPermission>();
|
||||
if (status != PermissionStatus.Granted)
|
||||
var status = await PermissionsService.CheckStatusAsync();
|
||||
if (status != Status.Granted)
|
||||
{
|
||||
var permissionResult = await PermissionsService.RequestPermissionAsync<LocationPermission>();
|
||||
var permissionResult = await PermissionsService.RequestAsync();
|
||||
|
||||
if (permissionResult != PermissionStatus.Granted)
|
||||
if (permissionResult != Status.Granted)
|
||||
{
|
||||
var dialogResult = await ViewService.DisplayAlert(
|
||||
AppResources.MessageTitleHint,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue