mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-21 21:46:27 +02:00
Version 3.0.368
This commit is contained in:
parent
24cdfbb0ca
commit
1a58bf58d3
78 changed files with 3104 additions and 2823 deletions
|
@ -57,7 +57,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
|
||||
/// <summary> Id of station a which bike is located, null otherwise.</summary>
|
||||
[DataMember]
|
||||
public string StationId { get; }
|
||||
public string StationId { get; private set; }
|
||||
|
||||
/// <summary> Name of station a which bike is located, null otherwise. </summary>
|
||||
[DataMember]
|
||||
|
@ -128,6 +128,24 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary> Loads a bike object from copri server booking_cancel (cancel reservation)/ booking_update (return bike) response.</summary>
|
||||
/// <param name="bike">Bike object to load response into.</param>
|
||||
/// <param name="notifyLevel">Controls whether notify property changed events are fired or not.</param>
|
||||
/// <param name="stationId">Id of the station if bike station changed, null otherwise.</param>
|
||||
public void Load(
|
||||
NotifyPropertyChangedLevel notifyLevel,
|
||||
string stationId = null)
|
||||
{
|
||||
State.Load(InUseStateEnum.Disposable, notifyLevel: notifyLevel);
|
||||
if (stationId == null)
|
||||
{
|
||||
// Station did not change.
|
||||
return;
|
||||
}
|
||||
|
||||
StationId = stationId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts the instance to text.
|
||||
/// </summary>
|
||||
|
|
|
@ -65,10 +65,17 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
DataSource DataSource { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or set the rental description.
|
||||
/// Gets the rental description.
|
||||
/// </summary>
|
||||
IRentalDescription TariffDescription { get; }
|
||||
|
||||
/// <summary> Loads a bike object from copri server booking_cancel (cancel reservation)/ booking_update (return bike) response.</summary>
|
||||
/// <param name="notifyLevel">Controls whether notify property changed events are fired or not.</param>
|
||||
/// <param name="stationId">Id of the station if bike station changed, null otherwise.</param>
|
||||
void Load(
|
||||
NotifyPropertyChangedLevel notifyLevel,
|
||||
string stationId = null);
|
||||
|
||||
event PropertyChangedEventHandler PropertyChanged;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
using TINK.Model.MiniSurvey;
|
||||
using TINK.Model.MiniSurvey;
|
||||
|
||||
namespace TINK.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds tasks to be accoumplished/ information shown to user after booking has finished.
|
||||
/// Holds tasks to be accomplished/ information shown to user after booking has finished.
|
||||
/// </summary>
|
||||
public class BookingFinishedModel : IBookingFinishedModel
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
|
||||
using TINK.Model.Connector.Updater;
|
||||
|
@ -288,7 +289,10 @@ namespace TINK.Model.Connector
|
|||
DoReturnResponse response
|
||||
= (await CopriServer.DoReturn(bike.Id, location, bike.OperatorUri)).GetIsReturnBikeResponseOk(bike.Id);
|
||||
|
||||
bike.Load(Bikes.BikeInfoNS.BC.NotifyPropertyChangedLevel.None);
|
||||
bike.Load(
|
||||
Bikes.BikeInfoNS.BC.NotifyPropertyChangedLevel.None,
|
||||
response.bike_returned.station ?? string.Empty);
|
||||
|
||||
return response?.Create() ?? new BookingFinishedModel();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,14 +17,6 @@ namespace TINK.Model.Connector.Updater
|
|||
/// <todo>Rename to UpdateFromCopri.</todo>
|
||||
public static class UpdaterJSON
|
||||
{
|
||||
/// <summary> Loads a bike object from copri server cancel reservation/ booking update request.</summary>
|
||||
/// <param name="bike">Bike object to load response into.</param>
|
||||
/// <param name="notifyLevel">Controls whether notify property changed events are fired or not.</param>
|
||||
public static void Load(
|
||||
this IBikeInfoMutable bike,
|
||||
NotifyPropertyChangedLevel notifyLevel)
|
||||
=> bike.State.Load(InUseStateEnum.Disposable, notifyLevel: notifyLevel);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all station for station provider and add them into station list.
|
||||
/// </summary>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TINK.MultilingualResources;
|
||||
using TINK.Repository.Exception;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
namespace TINK.Model
|
||||
|
@ -697,6 +698,11 @@ namespace TINK.Model
|
|||
AppResources.ChangeLog_3_0_366_MK_SB,
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
|
||||
},
|
||||
{
|
||||
new Version(3, 0, 368),
|
||||
string.Format("{0} <br /> {1}", AppResources.ChangeLog_PackageUpdates, AppResources.ChangeLog_MinorBugFixes),
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
|
||||
},
|
||||
};
|
||||
|
||||
/// <summary> Manges the whats new information.</summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue