mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 22:07:28 +02:00
Version 3.0.368
This commit is contained in:
parent
24cdfbb0ca
commit
1a58bf58d3
78 changed files with 3104 additions and 2823 deletions
|
@ -77,6 +77,7 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
/// <param name="smartDevice">Provides info about the smart device (phone, tablet, ...)</param>
|
||||
/// <param name="selectedBike">Bike to be displayed.</param>
|
||||
/// <param name="user">Object holding logged in user or an empty user object.</param>
|
||||
/// <param name="viewContext"> Holds the view context in which bike view model is used.</param>
|
||||
/// <param name="stateInfoProvider">Provides in use state information.</param>
|
||||
/// <param name="bikesViewModel">View model to be used for progress report and unlocking/ locking view.</param>
|
||||
/// <param name="openUrlInBrowser">Delegate to open browser.</param>
|
||||
|
@ -89,9 +90,10 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
IViewService viewService,
|
||||
BikeInfoMutable selectedBike,
|
||||
IUser user,
|
||||
ViewContext viewContext,
|
||||
IInUseStateInfoProvider stateInfoProvider,
|
||||
IBikesViewModel bikesViewModel,
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, user, stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
Action<string> openUrlInBrowser) : base(isConnectedDelegate, connectorFactory, bikeRemoveDelegate, viewUpdateManager, smartDevice, viewService, selectedBike, user, viewContext, stateInfoProvider, bikesViewModel, openUrlInBrowser)
|
||||
{
|
||||
RequestHandler = user.IsLoggedIn
|
||||
? RequestHandlerFactory.Create(
|
||||
|
@ -164,15 +166,13 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock
|
|||
private async Task ClickButton(Task<IRequestHandler> handleRequest)
|
||||
{
|
||||
var lastHandler = RequestHandler;
|
||||
var lastState = Bike.State.Value;
|
||||
var lastStateText = StateText;
|
||||
var lastStateColor = StateColor;
|
||||
|
||||
RequestHandler = await handleRequest;
|
||||
|
||||
if (lastHandler.IsRemoveBikeRequired)
|
||||
{
|
||||
BikeRemoveDelegate(Id);
|
||||
}
|
||||
CheckRemoveBike(Id, lastState);
|
||||
|
||||
if (RuntimeHelpers.Equals(lastHandler, RequestHandler))
|
||||
{
|
||||
|
|
|
@ -84,9 +84,6 @@ namespace TINK.ViewModel.Bikes.Bike.CopriLock.RequestHandler
|
|||
try
|
||||
{
|
||||
await ConnectorFactory(IsConnected).Command.DoCancelReservation(SelectedBike);
|
||||
|
||||
// If canceling bike succeeds remove bike because it is not ready to be booked again
|
||||
IsRemoveBikeRequired = true;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue