Skip to content

Commit 74cfd8d

Browse files
committed
Revert "Squashed commit of the following: (#19629)"
This reverts commit a984765.
1 parent 3928ab2 commit 74cfd8d

16 files changed

Lines changed: 8 additions & 632 deletions

File tree

src/Controls/src/Core/Page/Page.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public Task<string> DisplayActionSheet(string title, string cancel, string destr
282282
/// Displays a platform action sheet, allowing the application user to choose from several buttons.
283283
/// </summary>
284284
/// <param name="title">Title of the displayed action sheet. Can be <see langword="null"/> to hide the title.</param>
285-
/// <param name="cancel">Text to be displayed in the 'Cancel' button. Can be null to hide the cancel action.</param>
285+
/// <param name="cancel">Text to be displayed in the 'Cancel' button. Can be null to hide the <see langword="null"/> action.</param>
286286
/// <param name="destruction">Text to be displayed in the 'Destruct' button. Can be <see langword="null"/> to hide the destructive option.</param>
287287
/// <param name="flowDirection">The flow direction to be used by the action sheet.</param>
288288
/// <param name="buttons">Text labels for additional buttons.</param>

src/Controls/src/Core/Platform/AlertManager/AlertManager.iOS.cs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,12 @@ static void PresentPopUp(Page sender, Window virtualView, UIWindow platformView,
187187
presentingWindow = senderPageWindow;
188188
}
189189

190-
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad &&
191-
arguments is not null &&
192-
alert.PopoverPresentationController is not null &&
193-
platformView.RootViewController?.View is not null)
190+
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad && arguments != null)
194191
{
195192
var topViewController = GetTopUIViewController(presentingWindow);
196193
UIDevice.CurrentDevice.BeginGeneratingDeviceOrientationNotifications();
197194
var observer = NSNotificationCenter.DefaultCenter.AddObserver(UIDevice.OrientationDidChangeNotification,
198-
n => alert.PopoverPresentationController.SourceRect = topViewController.View.Bounds);
195+
n => { alert.PopoverPresentationController.SourceRect = topViewController.View.Bounds; });
199196

200197
arguments.Result.Task.ContinueWith(t =>
201198
{
@@ -219,7 +216,7 @@ alert.PopoverPresentationController is not null &&
219216
static UIViewController GetTopUIViewController(UIWindow platformWindow)
220217
{
221218
var topUIViewController = platformWindow.RootViewController;
222-
while (topUIViewController?.PresentedViewController is not null)
219+
while (topUIViewController.PresentedViewController is not null)
223220
{
224221
topUIViewController = topUIViewController.PresentedViewController;
225222
}

src/Controls/tests/CustomAttributes/Test.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -743,16 +743,6 @@ public enum InputTransparency
743743
CascadeTransLayoutOverlayWithButton,
744744
}
745745

746-
public enum Alerts
747-
{
748-
AlertCancel,
749-
AlertAcceptCancelClickAccept,
750-
AlertAcceptCancelClickCancel,
751-
ActionSheetClickItem,
752-
ActionSheetClickCancel,
753-
ActionSheetClickDestroy,
754-
}
755-
756746
public static class InputTransparencyMatrix
757747
{
758748
// this is both for color diff and cols

src/Controls/tests/TestCases.Shared.Tests/Tests/Concepts/AlertsGalleryTests.cs

Lines changed: 0 additions & 149 deletions
This file was deleted.

src/Controls/tests/TestCases/Concepts/AlertsGalleryPage.cs

Lines changed: 0 additions & 96 deletions
This file was deleted.

src/Controls/tests/TestCases/CoreViews/CorePageView.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ public override string ToString()
5151
new GalleryPageFactory(() => new GestureRecognizerGallery(), "Gesture Recognizer Gallery"),
5252
new GalleryPageFactory(() => new InputTransparencyGalleryPage(), "Input Transparency Gallery"),
5353
new GalleryPageFactory(() => new ImageLoadingGalleryPage(), "Image Loading Gallery"),
54-
new GalleryPageFactory(() => new AlertsGalleryPage(), "Alerts Gallery"),
5554
// Elements
5655
new GalleryPageFactory(() => new ActivityIndicatorCoreGalleryPage(), "ActivityIndicator Gallery"),
5756
new GalleryPageFactory(() => new BoxViewCoreGalleryPage(), "Box Gallery"),

0 commit comments

Comments
 (0)