Skip to content

Commit 691b7d6

Browse files
committed
Updated fix for windows, Changed public method to internal
1 parent 572aeea commit 691b7d6

File tree

5 files changed

+5
-14
lines changed

5 files changed

+5
-14
lines changed

src/Core/src/Handlers/TimePicker/TimePickerHandler.Android.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ public static void MapFont(ITimePickerHandler handler, ITimePicker timePicker)
9191
handler.PlatformView?.UpdateFont(timePicker, fontManager);
9292
}
9393

94-
public static void MapFlowDirection(ITimePickerHandler handler, ITimePicker timePicker)
94+
// Make it public in .NET 10.
95+
internal static void MapFlowDirection(ITimePickerHandler handler, ITimePicker timePicker)
9596
{
9697
if (handler.PlatformView is not null)
9798
{

src/Core/src/Handlers/TimePicker/TimePickerHandler.Windows.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#nullable enable
12
using Microsoft.UI.Xaml.Controls;
23
using WBrush = Microsoft.UI.Xaml.Media.Brush;
34

@@ -9,13 +10,11 @@ public partial class TimePickerHandler : ViewHandler<ITimePicker, TimePicker>
910

1011
protected override void ConnectHandler(TimePicker platformView)
1112
{
12-
platformView.Loaded += OnControlLoaded;
1313
platformView.TimeChanged += OnControlTimeChanged;
1414
}
1515

1616
protected override void DisconnectHandler(TimePicker platformView)
1717
{
18-
platformView.Loaded -= OnControlLoaded;
1918
platformView.TimeChanged -= OnControlTimeChanged;
2019
}
2120

@@ -41,7 +40,8 @@ public static void MapFont(ITimePickerHandler handler, ITimePicker timePicker)
4140
handler.PlatformView.UpdateFont(timePicker, fontManager);
4241
}
4342

44-
public static void MapFlowDirection(ITimePickerHandler handler, ITimePicker timePicker)
43+
// Make it public in .NET 10.
44+
internal static void MapFlowDirection(ITimePickerHandler handler, ITimePicker timePicker)
4545
{
4646
if (handler.PlatformView is not null)
4747
{
@@ -65,11 +65,6 @@ internal static void MapIsOpen(ITimePickerHandler handler, ITimePicker timePicke
6565
handler.PlatformView?.UpdateIsOpen(timePicker);
6666
}
6767

68-
void OnControlLoaded(object sender, RoutedEventArgs e)
69-
{
70-
PlatformView.UpdateTextAlignment(VirtualView);
71-
}
72-
7368
void OnControlTimeChanged(object? sender, TimePickerValueChangedEventArgs e)
7469
{
7570
if (VirtualView is not null)

src/Core/src/Platform/Windows/TimePickerExtensions.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,6 @@ internal static void UpdateIsOpen(this TimePicker platformTimePicker, ITimePicke
114114
// Look for button inside and invoke it
115115
var children = peer.GetChildren();
116116

117-
if (children is null)
118-
return;
119-
120117
foreach (var child in children)
121118
{
122119
if (child.GetClassName().Contains("Button", StringComparison.OrdinalIgnoreCase) &&

src/Core/src/PublicAPI/net-android/PublicAPI.Unshipped.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,4 +171,3 @@ virtual Microsoft.Maui.SwipeViewSwipeStarted.<Clone>$() -> Microsoft.Maui.SwipeV
171171
virtual Microsoft.Maui.SwipeViewSwipeStarted.EqualityContract.get -> System.Type!
172172
virtual Microsoft.Maui.SwipeViewSwipeStarted.Equals(Microsoft.Maui.SwipeViewSwipeStarted? other) -> bool
173173
virtual Microsoft.Maui.SwipeViewSwipeStarted.PrintMembers(System.Text.StringBuilder! builder) -> bool
174-
static Microsoft.Maui.Handlers.TimePickerHandler.MapFlowDirection(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void

src/Core/src/PublicAPI/net-windows/PublicAPI.Unshipped.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,3 @@ virtual Microsoft.Maui.SwipeViewSwipeStarted.<Clone>$() -> Microsoft.Maui.SwipeV
141141
virtual Microsoft.Maui.SwipeViewSwipeStarted.EqualityContract.get -> System.Type!
142142
virtual Microsoft.Maui.SwipeViewSwipeStarted.Equals(Microsoft.Maui.SwipeViewSwipeStarted? other) -> bool
143143
virtual Microsoft.Maui.SwipeViewSwipeStarted.PrintMembers(System.Text.StringBuilder! builder) -> bool
144-
static Microsoft.Maui.Handlers.TimePickerHandler.MapFlowDirection(Microsoft.Maui.Handlers.ITimePickerHandler! handler, Microsoft.Maui.ITimePicker! timePicker) -> void

0 commit comments

Comments
 (0)