PM-3350 Checked some [MAUI-Migration] and changed as needed.

TimePickerHandlerMappings: Remove old code for forcing the Wheel. After testing without it wheel picker is still used so this code shouldn't be needed anymore.
AppDelegate.ContinueUserActivity: Uncommented and changed the iOS ContinueUserActivity. It needs to call Platform.ContinueUserActivity according with Xamarin Essentials migration docs.
This commit is contained in:
Dinis Vieira 2023-10-24 23:37:18 +01:00
parent f177968958
commit e7aeb08cae
No known key found for this signature in database
GPG key ID: 9389160FF6C295F3
3 changed files with 4 additions and 20 deletions

View file

@ -249,16 +249,15 @@ namespace Bit.iOS
return _deepLinkContext.Value.OnNewUri(url) || base.OpenUrl(app, url, options);
}
// TODO: [MAUI-Migration] Check if this works given that the baes will call the invoke the service lifecycle.
/* public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity,
public override bool ContinueUserActivity(UIApplication application, NSUserActivity userActivity,
UIApplicationRestorationHandler completionHandler)
{
if (Xamarin.Essentials.Platform.ContinueUserActivity(application, userActivity, completionHandler))
if (Microsoft.Maui.ApplicationModel.Platform.ContinueUserActivity(application, userActivity, completionHandler))
{
return true;
}
return base.ContinueUserActivity(application, userActivity, completionHandler);
} */
}
[Export("application:didFailToRegisterForRemoteNotificationsWithError:")]
public void FailedToRegisterForRemoteNotifications(UIApplication application, NSError error)

View file

@ -249,7 +249,7 @@
AutomationId="SendHideTextByDefaultToggle" />
</StackLayout>
</StackLayout>
<!--TODO: [MAUI-Migration] xct:TouchEffect.Command="{Binding ToggleOptionsCommand}" for below-->
<!--TODO: [MAUI-Migration] xct:TouchEffect.Command="{Binding ToggleOptionsCommand}" for below ( https://github.com/CommunityToolkit/Maui/issues/86 ) -->
<StackLayout
Orientation="Horizontal"
Spacing="0"

View file

@ -20,21 +20,6 @@ namespace Bit.iOS.Core.Handlers
{
handler.PlatformView.Text = extTimePicker.PlaceHolder;
}
// force use of wheel picker on iOS 14+
// TODO remove this when we upgrade to X.F 5 SR-1
// TODO: [Maui-Migration] Check if this is needed given that we're not on XForms anymore.
// https://github.com/xamarin/Xamarin.Forms/issues/12258#issuecomment-700168665
try
{
if (UIDevice.CurrentDevice.CheckSystemVersion(13, 2)
&&
handler.PlatformView.InputView is UIDatePicker picker)
{
picker.PreferredDatePickerStyle = UIDatePickerStyle.Wheels;
}
}
catch { }
}
});