Manually merged.

This commit is contained in:
Oliver Hauff 2021-12-08 17:57:30 +01:00
parent d5832e010e
commit c7c9f252af
112 changed files with 1127 additions and 352 deletions

View file

@ -4,6 +4,7 @@ using Android.Content.PM;
using Android.OS;
using Android.Content;
using Java.Interop;
using Plugin.Permissions;
namespace TINK.Droid
{
@ -51,6 +52,12 @@ namespace TINK.Droid
{
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
else if (App.PermissionsService.GetType() == typeof(TINK.Services.Permissions.Plugin.Permissions))
{
// Bug in 3.0.244 and earlier versions of sharee.bike app: Call of PermissionsImplementation.Current.OnRequestedPermission result was missing.
// see https://dev.azure.com/TeilRad/sharee.bike%20Buchungsplattform/_workitems/edit/136 for further details.
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}

View file

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

View file

@ -14,7 +14,7 @@ namespace TINK.Droid
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "12.1.0.11")]
public partial class Resource
{

View file

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
@ -49,8 +49,8 @@
<key>CFBundleDisplayName</key>
<string>sharee.bike</string>
<key>CFBundleVersion</key>
<string>262</string>
<string>263</string>
<key>CFBundleShortVersionString</key>
<string>3.0.262</string>
<string>3.0.263</string>
</dict>
</plist>

View file

@ -282,7 +282,7 @@ namespace TINK
if (_PermissionsService != null)
return _PermissionsService;
_PermissionsService = new Services.Permissions.Essentials.Permissions();
_PermissionsService = new Services.Permissions.Plugin.Permissions();
return _PermissionsService;
}
}

View file

@ -149,7 +149,7 @@ namespace TINK.View.Account
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
}
}

View file

@ -228,7 +228,10 @@ using TINK.View.MasterDetail;
#if USCSHARP9
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
#else
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
/// <summary> Displays user feedback popup.</summary>
/// <param name="co2Saving"> Co2 saving information.</param>
/// <returns>User feedback.</returns>
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
#endif
}
}

View file

@ -88,7 +88,15 @@ namespace TINK.View.Contact
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
#if USEFLYOUT
/// <summary>
/// Delegate to perform navigation.
/// </summary>
public INavigationMasterDetail NavigationMasterDetail { set; private get; }
#endif
#if USEFLYOUT

View file

@ -114,7 +114,7 @@ namespace TINK.View.Contact
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
#if USEFLYOUT

View file

@ -12,11 +12,14 @@
<Grid.RowDefinitions>
<!-- Head and title row -->
<RowDefinition Height="auto"/>
<!--- Co2saving-->
<RowDefinition Height="auto"/>
<!--- checkbox and input elements-->
<RowDefinition Height="*"/>
<!--- ok button-->
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<!-- Head and title -->
<Grid
Padding="30"
BackgroundColor="{DynamicResource primary-back-title-color}">
@ -34,7 +37,16 @@
</Image.Source>
</Image>
</Grid>
<ScrollView Grid.Row="1">
<!-- Co2saving -->
<Frame
x:Name="Co2SavingFrame"
Grid.Row="1">
<Label
x:Name="Co2SavingLabel"
Text=""/>
</Frame>
<!-- Checkbox and input elements -->
<ScrollView Grid.Row="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@ -77,8 +89,9 @@
</StackLayout>
</Grid>
</ScrollView>
<!-- Buttons -->
<Button
Grid.Row="2"
Grid.Row="3"
Clicked="OnOkClicked"
Text="OK"/>
</Grid>

View file

@ -7,9 +7,15 @@ namespace TINK.View
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class FeedbackPopup : Popup<FeedbackPopup.Result>
{
public FeedbackPopup()
/// <summary> Constructs user feedback popup.</summary>
/// <param name="co2Saving"> Co2 saving information.</param>
public FeedbackPopup(string co2Saving = null)
{
InitializeComponent();
if (string.IsNullOrEmpty(co2Saving))
Co2SavingFrame.IsVisible = false;
else
Co2SavingLabel.Text = co2Saving;
}
protected override FeedbackPopup.Result GetLightDismissResult()

View file

@ -138,7 +138,10 @@ namespace TINK.View.FindBike
#if USCSHARP9
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
#else
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
/// <summary> Displays user feedback popup.</summary>
/// <param name="co2Saving"> Co2 saving information.</param>
/// <returns>User feedback.</returns>
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
#endif
}
}

View file

@ -122,7 +122,7 @@ namespace TINK.View.Info.BikeInfo
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
}
}

View file

@ -116,7 +116,7 @@ namespace TINK.View.Login
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
}
}

View file

@ -120,7 +120,7 @@ namespace TINK.View.Map
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
#if USEFLYOUT
@ -142,6 +142,8 @@ namespace TINK.View.Map
// Pass reference to member Navigation to show bikes at station x dialog.
try
{
Log.ForContext<MapPage>().Verbose("Constructing map page view model.");
#if TRYNOTBACKSTYLE
MapPageViewModel = new MapPageViewModel();
#else
@ -193,7 +195,10 @@ namespace TINK.View.Map
try
{
// Pre move and scanle maps to avoid initial display of map in Rome.
PremoveAndScaleMap();
Log.ForContext<MapPage>().Verbose("Moving and scaling map.");
MapPageViewModel.MoveAndScale(
(mapSpan) => MyMap.MoveToRegion(mapSpan),
App.ModelRoot.MapSpan);
}
catch(Exception exception)
{

View file

@ -89,7 +89,10 @@ namespace TINK.View.MiniSurvey
#if USCSHARP9
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
#else
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
/// <summary> Displays user feedback popup.</summary>
/// <param name="co2Saving"> Co2 saving information.</param>
/// <returns>User feedback.</returns>
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
#endif
}
}

View file

@ -163,7 +163,10 @@ namespace TINK.View.MyBikes
#if USCSHARP9
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
#else
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
/// <summary> Displays user feedback popup.</summary>
/// <param name="co2Saving"> Co2 saving information.</param>
/// <returns>User feedback.</returns>
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
#endif
}
}

View file

@ -146,7 +146,10 @@ namespace TINK.View.Settings
#if USCSHARP9
public async Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
#else
public async Task<IUserFeedback> DisplayUserFeedbackPopup() => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup());
/// <summary> Displays user feedback popup.</summary>
/// <param name="co2Saving"> Co2 saving information.</param>
/// <returns>User feedback.</returns>
public async Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => await Navigation.ShowPopupAsync<FeedbackPopup.Result>(new FeedbackPopup(co2Saving));
#endif
#if USERFEEDBACKDLG_TRYOUT

View file

@ -75,7 +75,7 @@ namespace TINK.View.WhatsNew.Agb
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
}
}

View file

@ -79,7 +79,7 @@ namespace TINK.View.WhatsNew
#if USCSHARP9
public Task<IViewService.IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
#else
public Task<IUserFeedback> DisplayUserFeedbackPopup() => throw new NotSupportedException();
public Task<IUserFeedback> DisplayUserFeedbackPopup(string co2Saving = null) => throw new NotSupportedException();
#endif
/// <summary>