Version 3.0.341

This commit is contained in:
Oliver Hauff 2022-09-22 20:58:30 +02:00
parent bad07e1ec9
commit d852ccef4c
26 changed files with 108 additions and 45 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.340" android:versionCode="340"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.LastenradBayern" android:versionName="3.0.341" android:versionCode="341">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" /> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions --> <!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services --> <!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>LastenradBayern</string> <string>LastenradBayern</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>340</string> <string>341</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.0.340</string> <string>3.0.341</string>
</dict> </dict>
</plist> </plist>

View file

@ -4,7 +4,9 @@
x:Class="TINK.View.BikesAtStation.BikesAtStationPage" x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
xmlns:local_bike="clr-namespace:TINK.View.Bike" xmlns:local_bike="clr-namespace:TINK.View.Bike"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"> xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="{Binding IsIdle}">
<Shell.TitleView> <Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*"> <Grid ColumnDefinitions="Auto, 1*">

View file

@ -1,4 +1,4 @@

using TINK.Model.Bikes.BikeInfoNS.BluetoothLock; using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
using Xamarin.Forms; using Xamarin.Forms;
using Xamarin.Forms.Xaml; using Xamarin.Forms.Xaml;
@ -150,6 +150,12 @@ namespace TINK.View.BikesAtStation
#endif #endif
} }
/// <summary>
/// Handeles pressing of the Android hardware back button.
/// </summary>
/// <returns></returns>
protected override bool OnBackButtonPressed() => !m_oViewModel.IsIdle;
/// <summary> Displays alert message.</summary> /// <summary> Displays alert message.</summary>
/// <param name="title">Title of message.</param> /// <param name="title">Title of message.</param>
/// <param name="message">Message to display.</param> /// <param name="message">Message to display.</param>

View file

@ -4,7 +4,8 @@
x:Class="TINK.View.MyBikes.MyBikesPage" x:Class="TINK.View.MyBikes.MyBikesPage"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View" xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
xmlns:local_bike="clr-namespace:TINK.View.Bike"> xmlns:local_bike="clr-namespace:TINK.View.Bike"
Shell.FlyoutBehavior="{Binding FlyoutBehavior}">
<Shell.TitleView> <Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*"> <Grid ColumnDefinitions="Auto, 1*">

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.340" android:versionCode="340"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.TeilRad.Meinkonrad" android:versionName="3.0.341" android:versionCode="341">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" /> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions --> <!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services --> <!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>Mein konrad</string> <string>Mein konrad</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>340</string> <string>341</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.0.340</string> <string>3.0.341</string>
</dict> </dict>
</plist> </plist>

View file

@ -4,7 +4,9 @@
x:Class="TINK.View.BikesAtStation.BikesAtStationPage" x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
xmlns:local_bike="clr-namespace:TINK.View.Bike" xmlns:local_bike="clr-namespace:TINK.View.Bike"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"> xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="{Binding IsIdle}">
<Shell.TitleView> <Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*"> <Grid ColumnDefinitions="Auto, 1*">

View file

@ -1,4 +1,4 @@

using TINK.Model.Bikes.BikeInfoNS.BluetoothLock; using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
using Xamarin.Forms; using Xamarin.Forms;
using Xamarin.Forms.Xaml; using Xamarin.Forms.Xaml;
@ -151,6 +151,12 @@ namespace TINK.View.BikesAtStation
#endif #endif
} }
/// <summary>
/// Handeles pressing of the Android hardware back button.
/// </summary>
/// <returns></returns>
protected override bool OnBackButtonPressed() => !m_oViewModel.IsIdle;
/// <summary> Displays alert message.</summary> /// <summary> Displays alert message.</summary>
/// <param name="title">Title of message.</param> /// <param name="title">Title of message.</param>
/// <param name="message">Message to display.</param> /// <param name="message">Message to display.</param>

View file

@ -4,7 +4,8 @@
x:Class="TINK.View.MyBikes.MyBikesPage" x:Class="TINK.View.MyBikes.MyBikesPage"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View" xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
xmlns:local_bike="clr-namespace:TINK.View.Bike"> xmlns:local_bike="clr-namespace:TINK.View.Bike"
Shell.FlyoutBehavior="{Binding FlyoutBehavior}">
<Shell.TitleView> <Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*"> <Grid ColumnDefinitions="Auto, 1*">

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.340" android:versionCode="340"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.hauffware.sharee" android:versionName="3.0.341" android:versionCode="341">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" /> <uses-sdk android:minSdkVersion="19" android:targetSdkVersion="30" />
<!-- Google Maps related permissions --> <!-- Google Maps related permissions -->
<!-- Permission to receive remote notifications from Google Play Services --> <!-- Permission to receive remote notifications from Google Play Services -->

View file

@ -55,8 +55,8 @@
<key>CFBundleDisplayName</key> <key>CFBundleDisplayName</key>
<string>sharee.bike</string> <string>sharee.bike</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>340</string> <string>341</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>3.0.340</string> <string>3.0.341</string>
</dict> </dict>
</plist> </plist>

View file

@ -5,7 +5,9 @@
x:Class="TINK.View.BikesAtStation.BikesAtStationPage" x:Class="TINK.View.BikesAtStation.BikesAtStationPage"
xmlns:local_bike="clr-namespace:TINK.View.Bike" xmlns:local_bike="clr-namespace:TINK.View.Bike"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"> xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
Shell.FlyoutBehavior="Disabled"
Shell.NavBarIsVisible="{Binding IsIdle}">
<Shell.TitleView> <Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*"> <Grid ColumnDefinitions="Auto, 1*">

View file

@ -1,4 +1,4 @@

using TINK.Model.Bikes.BikeInfoNS.BluetoothLock; using TINK.Model.Bikes.BikeInfoNS.BluetoothLock;
using Xamarin.Forms; using Xamarin.Forms;
using Xamarin.Forms.Xaml; using Xamarin.Forms.Xaml;
@ -151,6 +151,12 @@ namespace TINK.View.BikesAtStation
#endif #endif
} }
/// <summary>
/// Handeles pressing of the Android hardware back button.
/// </summary>
/// <returns></returns>
protected override bool OnBackButtonPressed() => !m_oViewModel.IsIdle;
/// <summary> Displays alert message.</summary> /// <summary> Displays alert message.</summary>
/// <param name="title">Title of message.</param> /// <param name="title">Title of message.</param>
/// <param name="message">Message to display.</param> /// <param name="message">Message to display.</param>

View file

@ -5,7 +5,8 @@
x:Class="TINK.View.MyBikes.MyBikesPage" x:Class="TINK.View.MyBikes.MyBikesPage"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib" xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View" xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
xmlns:local_bike="clr-namespace:TINK.View.Bike"> xmlns:local_bike="clr-namespace:TINK.View.Bike"
Shell.FlyoutBehavior="{Binding FlyoutBehavior}">
<Shell.TitleView> <Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*"> <Grid ColumnDefinitions="Auto, 1*">

View file

@ -596,12 +596,12 @@ namespace TINK.Model
new List<AppFlavor> { AppFlavor.MeinKonrad } new List<AppFlavor> { AppFlavor.MeinKonrad }
}, },
{ {
new Version(3, 0, 340), new Version(3, 0, 341),
AppResources.ChangeLog_MinorDesignImprovements, AppResources.ChangeLog_MinorDesignImprovements,
new List<AppFlavor> { AppFlavor.LastenradBayern, AppFlavor.MeinKonrad } new List<AppFlavor> { AppFlavor.LastenradBayern, AppFlavor.MeinKonrad }
}, },
{ {
new Version(3, 0, 340), new Version(3, 0, 341),
AppResources.ChangeLog_MinorBugFixes, AppResources.ChangeLog_MinorBugFixes,
new List<AppFlavor> { AppFlavor.ShareeBike } new List<AppFlavor> { AppFlavor.ShareeBike }
} }

View file

@ -250,7 +250,7 @@ namespace TINK.MultilingualResources {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to Checking state permissions.... /// Looks up a localized string similar to Checking state and permissions....
/// </summary> /// </summary>
public static string ActivityTextCheckBluetoothState { public static string ActivityTextCheckBluetoothState {
get { get {
@ -1792,6 +1792,15 @@ namespace TINK.MultilingualResources {
} }
} }
/// <summary>
/// Looks up a localized string similar to &lt;font color=&quot;gray&quot;&gt;&lt;u&gt;Contact&lt;/u&gt;&lt;/font&gt; {0}..
/// </summary>
public static string MarkingContactSupportBusy {
get {
return ResourceManager.GetString("MarkingContactSupportBusy", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Charging level: {0}/{1} bars. /// Looks up a localized string similar to Charging level: {0}/{1} bars.
/// </summary> /// </summary>

View file

@ -1034,4 +1034,7 @@ Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben:
<data name="ChangeLog_MinorDesignImprovements" xml:space="preserve"> <data name="ChangeLog_MinorDesignImprovements" xml:space="preserve">
<value>Es wurden ein paar Kleinigkeiten im Design verändert.</value> <value>Es wurden ein paar Kleinigkeiten im Design verändert.</value>
</data> </data>
<data name="MarkingContactSupportBusy" xml:space="preserve">
<value>{0} &lt;font color="gray"&gt;&lt;u&gt;kontaktieren&lt;/u&gt;&lt;/font&gt;.</value>
</data>
</root> </root>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<root> <root>
<!-- <!--
Microsoft ResX Schema Microsoft ResX Schema
@ -701,7 +701,7 @@ Layout of bike names and id display improved.</value>
<value>Select Bike</value> <value>Select Bike</value>
</data> </data>
<data name="ActivityTextCheckBluetoothState" xml:space="preserve"> <data name="ActivityTextCheckBluetoothState" xml:space="preserve">
<value>Checking state permissions...</value> <value>Checking state and permissions...</value>
</data> </data>
<data name="ActivityTextFindBikeLoadingBikes" xml:space="preserve"> <data name="ActivityTextFindBikeLoadingBikes" xml:space="preserve">
<value>Loading Bikes...</value> <value>Loading Bikes...</value>
@ -1126,4 +1126,7 @@ You can now see at a glance which app version you have installed: in the menu at
<data name="ChangeLog_MinorDesignImprovements" xml:space="preserve"> <data name="ChangeLog_MinorDesignImprovements" xml:space="preserve">
<value>A few small things have been changed in the design.</value> <value>A few small things have been changed in the design.</value>
</data> </data>
<data name="MarkingContactSupportBusy" xml:space="preserve">
<value>&lt;font color="gray"&gt;&lt;u&gt;Contact&lt;/u&gt;&lt;/font&gt; {0}.</value>
</data>
</root> </root>

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd"> <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en-GB" target-language="de" original="TINKLIB/MULTILINGUALRESOURCES/APPRESOURCES.RESX" tool-id="MultilingualAppToolkit" product-name="n/a" product-version="n/a" build-num="n/a"> <file datatype="xml" source-language="en-GB" target-language="de" original="TINKLIB/MULTILINGUALRESOURCES/APPRESOURCES.RESX" tool-id="MultilingualAppToolkit" product-name="n/a" product-version="n/a" build-num="n/a">
<header> <header>
@ -802,7 +802,7 @@ Layout Anzeige Radnamen und nummern verbessert.</target>
<target state="translated">Rad auswählen</target> <target state="translated">Rad auswählen</target>
</trans-unit> </trans-unit>
<trans-unit id="ActivityTextCheckBluetoothState" translate="yes" xml:space="preserve"> <trans-unit id="ActivityTextCheckBluetoothState" translate="yes" xml:space="preserve">
<source>Checking state permissions...</source> <source>Checking state and permissions...</source>
<target state="translated">Prüfe Status und Berechtigungen...</target> <target state="translated">Prüfe Status und Berechtigungen...</target>
</trans-unit> </trans-unit>
<trans-unit id="ActivityTextFindBikeLoadingBikes" translate="yes" xml:space="preserve"> <trans-unit id="ActivityTextFindBikeLoadingBikes" translate="yes" xml:space="preserve">
@ -1404,6 +1404,10 @@ Sie können nun auf einen Blick sehen, welche App-Version Sie installiert haben:
<source>A few small things have been changed in the design.</source> <source>A few small things have been changed in the design.</source>
<target state="translated">Es wurden ein paar Kleinigkeiten im Design verändert.</target> <target state="translated">Es wurden ein paar Kleinigkeiten im Design verändert.</target>
</trans-unit> </trans-unit>
<trans-unit id="MarkingContactSupportBusy" translate="yes" xml:space="preserve">
<source><bpt id="1">&lt;font color="gray"&gt;</bpt><bpt id="2">&lt;u&gt;</bpt>Contact<ept id="2">&lt;/u&gt;</ept><ept id="1">&lt;/font&gt;</ept> {0}.</source>
<target state="translated">{0} <bpt id="1">&lt;font color="gray"&gt;</bpt><bpt id="2">&lt;u&gt;</bpt>kontaktieren<ept id="2">&lt;/u&gt;</ept><ept id="1">&lt;/font&gt;</ept>.</target>
</trans-unit>
</group> </group>
</body> </body>
</file> </file>

View file

@ -277,7 +277,7 @@ namespace TINK.Repository.Request
: string.Empty; : string.Empty;
private static string GetVersionInfoParameter(IVersionInfo versionInfo) => versionInfo?.FirmwareVersion > 0 || versionInfo?.HardwareVersion > 0 || versionInfo?.LockVersion > 0 private static string GetVersionInfoParameter(IVersionInfo versionInfo) => versionInfo?.FirmwareVersion > 0 || versionInfo?.HardwareVersion > 0 || versionInfo?.LockVersion > 0
? $"&firmware=HW%20{versionInfo.HardwareVersion};FW%20{versionInfo.FirmwareVersion};Lock%20{versionInfo.LockVersion}" ? $"&firmware=HW%20{versionInfo.HardwareVersion}%3BFW%20{versionInfo.FirmwareVersion}%3BLock%20{versionInfo.LockVersion}"
: string.Empty; : string.Empty;
/// <summary> Gets the geolocation parameter. </summary> /// <summary> Gets the geolocation parameter. </summary>

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
@ -112,7 +112,7 @@ namespace TINK.ViewModel.BikesAtStation
: AppResources.MarkingLoginRequiredToRerserve; : AppResources.MarkingLoginRequiredToRerserve;
public string ContactSupportHintText public string ContactSupportHintText
=> string.Format(AppResources.MarkingContactSupport, Station.OperatorData?.Name ?? "Operator"); => string.Format(IsIdle ? AppResources.MarkingContactSupport : AppResources.MarkingContactSupportBusy, Station.OperatorData?.Name ?? "Operator");
/// <summary> /// <summary>
/// Returns if info about the fact that user did not request or book any bikes is visible or not. /// Returns if info about the fact that user did not request or book any bikes is visible or not.
@ -185,6 +185,12 @@ namespace TINK.ViewModel.BikesAtStation
{ {
try try
{ {
if (!IsIdle)
{
// Prevent navigation when app is not idle because this might lead to aborting return bike workflow.
return;
}
// Switch to map page // Switch to map page
#if USEFLYOUT #if USEFLYOUT
@ -211,7 +217,7 @@ namespace TINK.ViewModel.BikesAtStation
{ {
Log.ForContext<BikesAtStationPageViewModel>().Information($"Bikes at station {Station.StationName} is appearing, either due to tap on a station or to app being shown again."); Log.ForContext<BikesAtStationPageViewModel>().Information($"Bikes at station {Station.StationName} is appearing, either due to tap on a station or to app being shown again.");
ActionText = "Einen Moment bitte..."; ActionText = AppResources.ActivityTextOneMomentPlease;
// Stop polling before getting bikes info. // Stop polling before getting bikes info.
await m_oViewUpdateManager.StopUpdatePeridically(); await m_oViewUpdateManager.StopUpdatePeridically();
@ -225,7 +231,7 @@ namespace TINK.ViewModel.BikesAtStation
var bikesAtStation = bikesAll.Response.GetAtStation(Station.Id); var bikesAtStation = bikesAll.Response.GetAtStation(Station.Id);
var lockIdList = bikesAtStation var lockIdList = bikesAtStation
.GetLockIt() .GetLockIt()
.Cast<Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo>() .Cast<BikeInfo>()
.Select(x => x.LockInfo) .Select(x => x.LockInfo)
.ToList(); .ToList();
@ -234,7 +240,7 @@ namespace TINK.ViewModel.BikesAtStation
serviceFake.UpdateSimulation(bikesAtStation); serviceFake.UpdateSimulation(bikesAtStation);
} }
ActionText = AppResources.ActivityTextSearchBikes; ActionText = AppResources.ActivityTextCheckBluetoothState;
// Check location permissions. // Check location permissions.
if (bikesAtStation.GetLockIt().Count > 0 if (bikesAtStation.GetLockIt().Count > 0
@ -377,6 +383,7 @@ namespace TINK.ViewModel.BikesAtStation
base.IsIdle = value; base.IsIdle = value;
base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsNoBikesAtStationVisible))); base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsNoBikesAtStationVisible)));
base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(NoBikesAtStationText))); base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(NoBikesAtStationText)));
base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(ContactSupportHintText)));
} }
} }
} }

View file

@ -1,4 +1,4 @@

using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
@ -159,7 +159,7 @@ namespace TINK.ViewModel.FindBike
var lockIdList = bikeCollection var lockIdList = bikeCollection
.GetLockIt() .GetLockIt()
.Cast<Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo>() .Cast<BikeInfo>()
.Select(x => x.LockInfo) .Select(x => x.LockInfo)
.ToList(); .ToList();
@ -171,7 +171,7 @@ namespace TINK.ViewModel.FindBike
// Check bluetooth and location permission and states // Check bluetooth and location permission and states
ActionText = AppResources.ActivityTextCheckBluetoothState; ActionText = AppResources.ActivityTextCheckBluetoothState;
if (bikeCollection.FirstOrDefault(x => x is Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo btBike) != null if (bikeCollection.FirstOrDefault(x => x is BikeInfo btBike) != null
&& RuntimePlatform == Device.Android) && RuntimePlatform == Device.Android)
{ {
// Check location permission // Check location permission

View file

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.ComponentModel; using System.ComponentModel;
@ -112,7 +112,7 @@ namespace TINK.ViewModel.MyBikes
var lockIdList = bikesOccupied.Response var lockIdList = bikesOccupied.Response
.GetLockIt() .GetLockIt()
.Cast<Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo>() .Cast<BikeInfo>()
.Select(x => x.LockInfo) .Select(x => x.LockInfo)
.ToList(); .ToList();
@ -124,7 +124,7 @@ namespace TINK.ViewModel.MyBikes
// Check bluetooth and location permission and states // Check bluetooth and location permission and states
ActionText = AppResources.ActivityTextCheckBluetoothState; ActionText = AppResources.ActivityTextCheckBluetoothState;
if (bikesOccupied.Response.FirstOrDefault(x => x is Model.Bikes.BikeInfoNS.BluetoothLock.BikeInfo btBike) != null if (bikesOccupied.Response.FirstOrDefault(x => x is BikeInfo btBike) != null
&& RuntimePlatform == Device.Android) && RuntimePlatform == Device.Android)
{ {
// Check location permission // Check location permission
@ -233,9 +233,16 @@ namespace TINK.ViewModel.MyBikes
base.IsIdle = value; base.IsIdle = value;
base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsNoBikesOccupiedVisible))); base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(IsNoBikesOccupiedVisible)));
base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(NoBikesOccupiedText))); base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(NoBikesOccupiedText)));
base.OnPropertyChanged(new PropertyChangedEventArgs(nameof(FlyoutBehavior))); // Hide flyout menu if app is busy. Prevents especially navigation on returning bike.
} }
} }
/// <summary>
/// Determines if flyout menu is available or not.
/// </summary>
public FlyoutBehavior FlyoutBehavior => base.IsIdle ? FlyoutBehavior.Flyout : FlyoutBehavior.Disabled;
/// <summary> Create task which updates my bike view model.</summary> /// <summary> Create task which updates my bike view model.</summary>
private void UpdateTask() private void UpdateTask()
{ {

View file

@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net;
using NUnit.Framework; using NUnit.Framework;
using TINK.Repository.Exception; using TINK.Repository.Exception;
using TINK.Repository.Request; using TINK.Repository.Request;
@ -230,8 +231,8 @@ namespace TestShareeLib.Repository.Request
{ {
var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie"); var builder = new RequestBuilderLoggedIn("MyMeranctIt", null /*UI language */, "MySessionCookie");
Assert.That( Assert.That(
builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.VersionInfo.Builder { FirmwareVersion=13, HardwareVersion=12, LockVersion=14}.Build()), WebUtility.UrlDecode(builder.UpateLockingState("12", lock_state.locked, null /* geolocaion */, 15.03, new TINK.Model.Bikes.BikeInfoNS.BluetoothLock.VersionInfo.Builder { FirmwareVersion=13, HardwareVersion=12, LockVersion=14}.Build())),
Is.EqualTo("request=booking_update&bike=12&lock_state=locked&voltage=15.03&firmware=HW%2012;FW%2013;Lock%2014&authcookie=MySessionCookieMyMeranctIt")); Is.EqualTo("request=booking_update&bike=12&lock_state=locked&voltage=15.03&firmware=HW 12;FW 13;Lock 14&authcookie=MySessionCookieMyMeranctIt"));
} }

View file

@ -12,6 +12,8 @@
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<ReleaseVersion>3.0</ReleaseVersion> <ReleaseVersion>3.0</ReleaseVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>