diff --git a/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs b/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs index 4de9614..728fc52 100644 --- a/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs +++ b/TINKLib/ViewModel/FindBike/FindBikePageViewModel.cs @@ -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().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 { { selectedBike.Id, selectedBike } }) + : new BikeCollection(); + PostAction( unused => {