mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-22 15:06:26 +01:00
Update function corrected: Selected bike is updated, not MyBikes.
This commit is contained in:
parent
d874877998
commit
a7eba321bb
1 changed files with 7 additions and 1 deletions
|
@ -247,7 +247,7 @@ namespace TINK.ViewModel.FindBike
|
|||
},
|
||||
null);
|
||||
|
||||
var result = ConnectorFactory(IsConnected).Query.GetBikesOccupiedAsync().Result;
|
||||
var result = ConnectorFactory(IsConnected).Query.GetBikesAsync().Result;
|
||||
|
||||
var bikes = result.Response;
|
||||
|
||||
|
@ -257,6 +257,12 @@ namespace TINK.ViewModel.FindBike
|
|||
Log.ForContext<FindBikePageViewModel>().Error("Getting bikes occupied in polling context failed with exception {Exception}.", exception);
|
||||
}
|
||||
|
||||
var selectedBike = bikes.FirstOrDefault(x => x.Id.Equals(BikeIdUserInput.Trim(), StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
bikes = selectedBike != null
|
||||
? new BikeCollection(new Dictionary<string, Model.Bike.BC.BikeInfo> { { selectedBike.Id, selectedBike } })
|
||||
: new BikeCollection();
|
||||
|
||||
PostAction(
|
||||
unused =>
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue