Skip to content

Commit

Permalink
[create-pull-request] automated change (#11671)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored Nov 28, 2022
1 parent ab534a2 commit 1f2a6ae
Show file tree
Hide file tree
Showing 23 changed files with 46 additions and 44 deletions.
4 changes: 2 additions & 2 deletions src/BlazorWebView/src/Maui/iOS/BlazorWebViewHandler.iOS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ public void StartUrlSchemeTask(WKWebView webView, IWKUrlSchemeTask urlSchemeTask
dic.Add((NSString)"Content-Type", (NSString)contentType);
// Disable local caching. This will prevent user scripts from executing correctly.
dic.Add((NSString)"Cache-Control", (NSString)"no-cache, max-age=0, must-revalidate, no-store");
if(urlSchemeTask.Request.Url != null)
if (urlSchemeTask.Request.Url != null)
{
using var response = new NSHttpUrlResponse(urlSchemeTask.Request.Url, statusCode, "HTTP/1.1", dic);
urlSchemeTask.DidReceiveResponse(response);
}

}
urlSchemeTask.DidReceiveData(NSData.FromArray(responseBytes));
urlSchemeTask.DidFinish();
Expand Down
4 changes: 2 additions & 2 deletions src/Compatibility/Core/src/iOS/DragAndDropDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS
[SupportedOSPlatform("ios11.0")]
internal class DragAndDropDelegate : NSObject, IUIDragInteractionDelegate, IUIDropInteractionDelegate
{
#region UIDragInteractionDelegate
#region UIDragInteractionDelegate


[Export("dragInteraction:session:willEndWithOperation:")]
Expand All @@ -39,7 +39,7 @@ public UIDragItem[] GetItemsForBeginningSession(UIDragInteraction interaction, I

return new UIDragItem[0];
}
#endregion
#endregion

[Export("dropInteraction:canHandleSession:")]
[Preserve(Conditional = true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public virtual UITableViewCell GetCell(Cell item, UITableViewCell reusableCell,

WireUpForceUpdateSizeRequested(item, tvc, tv);

if(OperatingSystem.IsIOSVersionAtLeast(14))
if (OperatingSystem.IsIOSVersionAtLeast(14))
{
var content = tvc.DefaultContentConfiguration;
content.Text = item.ToString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,10 +323,10 @@ void UpdateProgressBarVisibility(bool isBusy)

bool PageIsInThisContext(IView page)
{
if(page.Handler == null)
if (page.Handler == null)
{
return false;
}
}

var platformView = page.ToPlatform();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.Maui.Controls.Platform.iOS;
internal class CustomHoverGestureRecognizer : UIHoverGestureRecognizer
{
NSObject _target;

public CustomHoverGestureRecognizer(NSObject target, Selector action) : base(target, action)
{
_target = target;
Expand Down
4 changes: 2 additions & 2 deletions src/Controls/src/Core/Platform/iOS/DragAndDropDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public DragAndDropDelegate(IPlatformViewHandler viewHandler)
_viewHandler = viewHandler;
}

#region UIDragInteractionDelegate
#region UIDragInteractionDelegate
[Export("dragInteraction:session:willEndWithOperation:")]
[Preserve(Conditional = true)]
public void SessionWillEnd(UIDragInteraction interaction, IUIDragSession session, UIDropOperation operation)
Expand All @@ -39,7 +39,7 @@ public UIDragItem[] GetItemsForBeginningSession(UIDragInteraction interaction, I
{
return HandleDragStarting((View)_viewHandler.VirtualView, _viewHandler);
}
#endregion
#endregion

[Export("dropInteraction:canHandleSession:")]
[Preserve(Conditional = true)]
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Core/Platform/iOS/ModalWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public override UIInterfaceOrientation PreferredInterfaceOrientationForPresentat
return base.PreferredInterfaceOrientationForPresentation();
}

// TODO: [UnsupportedOSPlatform("ios6.0")]
// TODO: [UnsupportedOSPlatform("ios6.0")]
#pragma warning disable CA1416, CA1422
public override bool ShouldAutorotate()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public async Task ScrollViewContentSizeSet()
return CreateHandlerAsync<ScrollViewHandler>(scrollView);
});

await InvokeOnMainThreadAsync(async () => {
await InvokeOnMainThreadAsync(async () =>
{
await scrollViewHandler.PlatformView.AttachAndRun(() =>
{
Assert.Equal(10000, scrollViewHandler.PlatformView.ContentSize.Height);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public void Setup()
[TearDown] public void TearDown() => AppInfo.SetCurrent(null);

[Test]
public void NativeInContentView([Values(false)]bool useCompiledXaml)
public void NativeInContentView([Values(false)] bool useCompiledXaml)
{
var layout = new NativeViewsAndBindings(useCompiledXaml);
layout.BindingContext = new
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Graphics/ShapeDrawable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void DrawFillPath(ICanvas canvas, RectF dirtyRect, PathF path)
{
if (ShapeView == null || ShapeView.Shape == null)
return;

canvas.SaveState();

canvas.FillColor = Colors.Transparent;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Handlers/Editor/EditorHandler.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static void MapPlaceholderColor(IEditorHandler handler, IEditor editor)
public static void MapCharacterSpacing(IEditorHandler handler, IEditor editor) =>
handler.PlatformView?.UpdateCharacterSpacing(editor);

public static void MapMaxLength(IEditorHandler handler, IEditor editor) =>
public static void MapMaxLength(IEditorHandler handler, IEditor editor) =>
handler.PlatformView?.UpdateMaxLength(editor);

public static void MapIsReadOnly(IEditorHandler handler, IEditor editor) =>
Expand All @@ -93,7 +93,7 @@ public static void MapIsTextPredictionEnabled(IEditorHandler handler, IEditor ed
public static void MapFont(IEditorHandler handler, IEditor editor) =>
handler.PlatformView?.UpdateFont(editor, handler.GetRequiredService<IFontManager>());

public static void MapHorizontalTextAlignment(IEditorHandler handler, IEditor editor) =>
public static void MapHorizontalTextAlignment(IEditorHandler handler, IEditor editor) =>
handler.PlatformView?.UpdateHorizontalTextAlignment(editor);

public static void MapVerticalTextAlignment(IEditorHandler handler, IEditor editor) =>
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Handlers/ViewHandlerExtensions.Android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ internal static void PlatformArrangeHandler(this IViewHandler viewHandler, Rect
viewHandler.Invoke(nameof(IView.Frame), frame);
}

internal static void PrepareForTextViewArrange(this IViewHandler handler, Rect frame)
internal static void PrepareForTextViewArrange(this IViewHandler handler, Rect frame)
{
if (frame.Width < 0 || frame.Height < 0)
{
Expand Down Expand Up @@ -164,7 +164,7 @@ internal static void PrepareForTextViewArrange(this IViewHandler handler, Rect f
}
}

internal static bool NeedsExactMeasure(this IView virtualView)
internal static bool NeedsExactMeasure(this IView virtualView)
{
if (virtualView.VerticalLayoutAlignment != Primitives.LayoutAlignment.Fill
&& virtualView.HorizontalLayoutAlignment != Primitives.LayoutAlignment.Fill)
Expand All @@ -185,7 +185,7 @@ internal static bool NeedsExactMeasure(this IView virtualView)
return true;
}

internal static int MakeMeasureSpecExact(this Context context, double size)
internal static int MakeMeasureSpecExact(this Context context, double size)
{
// Convert to a native size to create the spec for measuring
var deviceSize = (int)context!.ToPixels(size);
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Android/KeyboardManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public static bool IsSoftKeyboardVisible(this AView view)
var insets = ViewCompat.GetRootWindowInsets(view);
if (insets == null)
return false;

var result = insets.IsVisible(WindowInsetsCompat.Type.Ime());
return result;
}
Expand Down
6 changes: 3 additions & 3 deletions src/Core/src/Platform/iOS/SearchBarExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ internal static void UpdateBackground(this UISearchBar uiSearchBar, ISearchBar s
if (background is SolidPaint solidPaint)
uiSearchBar.BarTintColor = solidPaint.Color.ToPlatform();

if(background is GradientPaint gradientPaint)
if (background is GradientPaint gradientPaint)
ViewExtensions.UpdateBackground(uiSearchBar, gradientPaint);

if (background == null)
uiSearchBar.BarTintColor = UISearchBar.Appearance.BarTintColor;
}

public static void UpdateIsEnabled(this UISearchBar uiSearchBar, ISearchBar searchBar)
{
uiSearchBar.UserInteractionEnabled = searchBar.IsEnabled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public async Task ContentInitializesCorrectly()
}

[Fact]
public async Task ScrollViewContentSizeSet()
public async Task ScrollViewContentSizeSet()
{
EnsureHandlerCreated(builder => { builder.ConfigureMauiHandlers(handlers => { handlers.AddHandler<EntryStub, EntryHandler>(); }); });

Expand All @@ -64,14 +64,15 @@ public async Task ScrollViewContentSizeSet()
var scrollViewHandler = await InvokeOnMainThreadAsync(() =>
{
var handler = CreateHandler(scrollView);

// Setting an arbitrary value so we can verify that the handler is setting
// the UIScrollView's ContentSize property during AttachAndRun
handler.PlatformView.ContentSize = new CoreGraphics.CGSize(100, 100);
return handler;
});

await InvokeOnMainThreadAsync(async () => {
await InvokeOnMainThreadAsync(async () =>
{
await scrollViewHandler.PlatformView.AttachAndRun(() =>
{
// Verify that the ContentSize values have been modified
Expand Down
4 changes: 2 additions & 2 deletions src/Essentials/src/Accelerometer/Accelerometer.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public class AccelerometerChangedEventArgs : EventArgs
/// Public constructor for accelerometer data.
/// </summary>
/// <param name="x">X data</param>
/// <param name="y">Y data</param>
/// <param name="z">Z data</param>
/// <param name="y">Y data</param>
/// <param name="z">Z data</param>
public AccelerometerData(double x, double y, double z)
: this((float)x, (float)y, (float)z)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Essentials/src/AppInfo/AppTheme.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public enum AppTheme
{
/// <summary>Default, unknown or unspecified theme.</summary>
Unspecified,

/// <summary>Light theme.</summary>
Light,

Expand Down
2 changes: 1 addition & 1 deletion src/Essentials/src/Battery/Battery.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public enum BatteryPowerSource

/// <summary>Power source is the battery and is currently not being charged.</summary>
Battery = 1,

/// <summary>Power source is an AC Charger.</summary>
AC = 2,

Expand Down
2 changes: 1 addition & 1 deletion src/Essentials/src/DeviceInfo/DeviceInfo.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static class DeviceInfo
public static DeviceType DeviceType => Current.DeviceType;

static IDeviceInfo? currentImplementation;

/// <summary>
/// Provides the default implementation for static usage of this API.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Essentials/src/Platform/PlatformUtils.android.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ internal static void SetLocale(Java.Util.Locale locale)
#pragma warning disable CS0618 // Type or member is obsolete
#pragma warning disable CA1422 // Validate platform compatibility
#pragma warning disable CA1416 // Validate platform compatibility
config.Locale = locale;
config.Locale = locale;
resources.UpdateConfiguration(config, resources.DisplayMetrics);
#pragma warning restore CA1422 // Validate platform compatibility
#pragma warning restore CA1416 // Validate platform compatibility
Expand Down
8 changes: 4 additions & 4 deletions src/ProfiledAot/src/maui/AppFlyoutPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ namespace maui;

public partial class AppFlyoutPage : FlyoutPage
{
public AppFlyoutPage()
{
InitializeComponent();
}
public AppFlyoutPage()
{
InitializeComponent();
}
}
2 changes: 1 addition & 1 deletion src/ProfiledAot/src/maui/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public MainPage()
private async void Start()
{
CounterBtn.Text = await CommonMethods.Invoke();
_startCompleted= true;
_startCompleted = true;
LoadFlyoutPage();
}

Expand Down
14 changes: 7 additions & 7 deletions src/ProfiledAot/src/maui/Tabs.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ namespace maui;

public partial class Tabs : TabbedPage
{
public Tabs()
{
InitializeComponent();
public Tabs()
{
InitializeComponent();

Children.Add(new NavigationPage(new MainPage()) { Title = "Tab 1" });
Children.Add(new NavigationPage(new MainPage()) { Title = "Tab 2" });
Children.Add(new NavigationPage(new MainPage()) { Title = "Tab 3" });
}
Children.Add(new NavigationPage(new MainPage()) { Title = "Tab 1" });
Children.Add(new NavigationPage(new MainPage()) { Title = "Tab 2" });
Children.Add(new NavigationPage(new MainPage()) { Title = "Tab 3" });
}
}

0 comments on commit 1f2a6ae

Please sign in to comment.