Skip to content

Commit

Permalink
chore: Remove property for UAP splash entity (#1061)
Browse files Browse the repository at this point in the history
* chore: Refactor GetNativeSplashScreen method

* chore: Remove erroneous ItemGroup
  • Loading branch information
lukeblevins authored Mar 11, 2024
1 parent ec1b941 commit dfe2584
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,4 @@

<Import Project="..\..\Uno.Toolkit.Samples\Uno.Toolkit.Samples.Shared\Uno.Toolkit.Samples.Shared.projitems" Label="Shared" />

<ItemGroup>
<Page Remove="C:\Work\uno.toolkit.ui\samples\Uno.Toolkit.Samples\Uno.Toolkit.Samples.Shared\Content\TestPages\ShadowContainerRectangleTestPage.WinUI.xaml" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using Uno.Extensions;
using Uno.Logging;
using Uno.UI;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using System.Runtime.InteropServices;
using Android.OS;
Expand Down Expand Up @@ -38,7 +37,7 @@ public bool SplashIsEnabled
}
}

private static Task<FrameworkElement?> GetNativeSplashScreen(SplashScreen? splashScreen)
private static Task<FrameworkElement?> GetNativeSplashScreen()
{
try
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Xml.Linq;
using Microsoft.Extensions.Logging;
using Uno.Extensions;
using Windows.ApplicationModel.Activation;
using Windows.Graphics.Display;
using System.Reflection;
using System.IO;
Expand Down Expand Up @@ -51,7 +50,7 @@ public partial class ExtendedSplashScreen
RuntimeInformation.IsOSPlatform(OSPlatform.Create("WEBASSEMBLY")) // Legacy Value (Bootstrapper 1.2.0-dev.29 or earlier).
|| RuntimeInformation.IsOSPlatform(OSPlatform.Create("BROWSER"));

private static async Task<FrameworkElement?> GetNativeSplashScreen(SplashScreen? splashScreen)
private static async Task<FrameworkElement?> GetNativeSplashScreen()
{
// Position of image aligns with WASM Bootstrapper style for splash image
// see https://github.com/unoplatform/Uno.Wasm.Bootstrap/blob/7d82af66c7dc587f6d1f6b6382860051fc2d92a0/src/Uno.Wasm.Bootstrap/WasmCSS/uno-bootstrap.css#L21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using System.Threading.Tasks;
using Uno.Disposables;
using Uno.Extensions;
using Windows.ApplicationModel.Activation;
#if IS_WINUI
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
Expand All @@ -30,7 +29,7 @@ public partial class ExtendedSplashScreen : LoadingView
new PropertyMetadata(SplashScreenPlatform.All));

/// <summary>
/// Gets or sets the list of platforms where extended splash screen should be used.
/// Gets or sets the platform(s) where extended splash screen should be used.
/// </summary>
public SplashScreenPlatform Platforms
{
Expand All @@ -39,8 +38,6 @@ public SplashScreenPlatform Platforms
}
#endregion

public SplashScreen? SplashScreen { get; set; }

#region DependencyProperty: SplashScreenContent
internal static DependencyProperty SplashScreenContentProperty { get; } = DependencyProperty.Register(
nameof(SplashScreenContent),
Expand Down Expand Up @@ -80,7 +77,7 @@ protected override void OnApplyTemplate()

private async Task LoadNativeSplashScreen()
{
var splashScreenContent = await GetNativeSplashScreen(SplashScreen);
var splashScreenContent = await GetNativeSplashScreen();

if (splashScreenContent is not null)
{
Expand All @@ -92,7 +89,7 @@ private async Task LoadNativeSplashScreen()


#if !__ANDROID__ && !__IOS__ && !(WINDOWS || WINDOWS_UWP) && !NETSTANDARD2_0
private static Task<FrameworkElement?> GetNativeSplashScreen(SplashScreen? splashScreen)
private static Task<FrameworkElement?> GetNativeSplashScreen()
{
return Task.FromResult<FrameworkElement?>(null);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public partial class ExtendedSplashScreen
{
public bool SplashIsEnabled => (Platforms & SplashScreenPlatform.iOS) != 0;

private static Task<FrameworkElement?> GetNativeSplashScreen(SplashScreen? splashScreen)
private static Task<FrameworkElement?> GetNativeSplashScreen()
{
try
{
Expand Down

0 comments on commit dfe2584

Please sign in to comment.