Skip to content

Commit

Permalink
Revert "Squashed commit of the following: (#19629)"
Browse files Browse the repository at this point in the history
This reverts commit a984765.
  • Loading branch information
PureWeen committed Jun 20, 2024
1 parent 3928ab2 commit 74cfd8d
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 632 deletions.
2 changes: 1 addition & 1 deletion src/Controls/src/Core/Page/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public Task<string> DisplayActionSheet(string title, string cancel, string destr
/// Displays a platform action sheet, allowing the application user to choose from several buttons.
/// </summary>
/// <param name="title">Title of the displayed action sheet. Can be <see langword="null"/> to hide the title.</param>
/// <param name="cancel">Text to be displayed in the 'Cancel' button. Can be null to hide the cancel action.</param>
/// <param name="cancel">Text to be displayed in the 'Cancel' button. Can be null to hide the <see langword="null"/> action.</param>
/// <param name="destruction">Text to be displayed in the 'Destruct' button. Can be <see langword="null"/> to hide the destructive option.</param>
/// <param name="flowDirection">The flow direction to be used by the action sheet.</param>
/// <param name="buttons">Text labels for additional buttons.</param>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,12 @@ static void PresentPopUp(Page sender, Window virtualView, UIWindow platformView,
presentingWindow = senderPageWindow;
}

if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad &&
arguments is not null &&
alert.PopoverPresentationController is not null &&
platformView.RootViewController?.View is not null)
if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad && arguments != null)
{
var topViewController = GetTopUIViewController(presentingWindow);
UIDevice.CurrentDevice.BeginGeneratingDeviceOrientationNotifications();
var observer = NSNotificationCenter.DefaultCenter.AddObserver(UIDevice.OrientationDidChangeNotification,
n => alert.PopoverPresentationController.SourceRect = topViewController.View.Bounds);
n => { alert.PopoverPresentationController.SourceRect = topViewController.View.Bounds; });

arguments.Result.Task.ContinueWith(t =>
{
Expand All @@ -219,7 +216,7 @@ alert.PopoverPresentationController is not null &&
static UIViewController GetTopUIViewController(UIWindow platformWindow)
{
var topUIViewController = platformWindow.RootViewController;
while (topUIViewController?.PresentedViewController is not null)
while (topUIViewController.PresentedViewController is not null)
{
topUIViewController = topUIViewController.PresentedViewController;
}
Expand Down
10 changes: 0 additions & 10 deletions src/Controls/tests/CustomAttributes/Test.cs
Original file line number Diff line number Diff line change
Expand Up @@ -743,16 +743,6 @@ public enum InputTransparency
CascadeTransLayoutOverlayWithButton,
}

public enum Alerts
{
AlertCancel,
AlertAcceptCancelClickAccept,
AlertAcceptCancelClickCancel,
ActionSheetClickItem,
ActionSheetClickCancel,
ActionSheetClickDestroy,
}

public static class InputTransparencyMatrix
{
// this is both for color diff and cols
Expand Down

This file was deleted.

96 changes: 0 additions & 96 deletions src/Controls/tests/TestCases/Concepts/AlertsGalleryPage.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/Controls/tests/TestCases/CoreViews/CorePageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ public override string ToString()
new GalleryPageFactory(() => new GestureRecognizerGallery(), "Gesture Recognizer Gallery"),
new GalleryPageFactory(() => new InputTransparencyGalleryPage(), "Input Transparency Gallery"),
new GalleryPageFactory(() => new ImageLoadingGalleryPage(), "Image Loading Gallery"),
new GalleryPageFactory(() => new AlertsGalleryPage(), "Alerts Gallery"),
// Elements
new GalleryPageFactory(() => new ActivityIndicatorCoreGalleryPage(), "ActivityIndicator Gallery"),
new GalleryPageFactory(() => new BoxViewCoreGalleryPage(), "Box Gallery"),
Expand Down
Loading

0 comments on commit 74cfd8d

Please sign in to comment.