From 939fade6a1ee2cf5bb188ae05b453f61d1b8cadb Mon Sep 17 00:00:00 2001 From: jerrry08 Date: Fri, 3 Nov 2023 13:37:04 -0400 Subject: [PATCH] Update NuGet packages --- .../Yosu.Youtube.Converter.csproj | 2 +- Yosu.Youtube.Core/Yosu.Youtube.Core.csproj | 2 +- Yosu/MauiProgram.cs | 28 ++----------------- Yosu/Yosu.csproj | 23 +++++++-------- 4 files changed, 14 insertions(+), 41 deletions(-) diff --git a/Yosu.Youtube.Converter/Yosu.Youtube.Converter.csproj b/Yosu.Youtube.Converter/Yosu.Youtube.Converter.csproj index 7d9bedb..e56ec4f 100644 --- a/Yosu.Youtube.Converter/Yosu.Youtube.Converter.csproj +++ b/Yosu.Youtube.Converter/Yosu.Youtube.Converter.csproj @@ -21,7 +21,7 @@ - + diff --git a/Yosu.Youtube.Core/Yosu.Youtube.Core.csproj b/Yosu.Youtube.Core/Yosu.Youtube.Core.csproj index 8aef2cc..b40bf5b 100644 --- a/Yosu.Youtube.Core/Yosu.Youtube.Core.csproj +++ b/Yosu.Youtube.Core/Yosu.Youtube.Core.csproj @@ -14,7 +14,7 @@ - + diff --git a/Yosu/MauiProgram.cs b/Yosu/MauiProgram.cs index 943801a..7c6f52a 100644 --- a/Yosu/MauiProgram.cs +++ b/Yosu/MauiProgram.cs @@ -1,15 +1,13 @@ -using System.Linq; +using Berry.Maui; using CommunityToolkit.Maui; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Microsoft.Maui; using Microsoft.Maui.Controls; using Microsoft.Maui.Controls.Compatibility.Hosting; using Microsoft.Maui.Controls.Hosting; using Microsoft.Maui.Hosting; using Microsoft.Maui.LifecycleEvents; using Plugin.ContextMenuContainer; -using Plugin.MauiTouchEffect.Effects; using SkiaSharp.Views.Maui.Controls.Hosting; using Woka; using Yosu.Handlers; @@ -46,12 +44,10 @@ public static MauiApp CreateMauiApp() fonts.AddFont("fa-solid-900.ttf", "FaSolid"); }) .UseSkiaSharp() + .UseBerry() .UseMauiCompatibility() .ConfigureMauiHandlers(handlers => { - // Register ALL handlers in the assembly - handlers.AddCompatibilityRenderers(typeof(TouchEffect).Assembly); - #if ANDROID handlers.AddHandler(); handlers.AddHandler(); @@ -59,11 +55,6 @@ public static MauiApp CreateMauiApp() handlers.AddHandler(typeof(ContextMenuContainer), typeof(ContextMenuContainerRenderer)); }) - .ConfigureEffects(effects => - { - effects.AddCompatibilityEffects(typeof(TouchEffect).Assembly); - effects.Add(typeof(TouchEffect), typeof(PlatformTouchEffect)); - }) .ConfigureWorkarounds() .ConfigureLifecycleEvents(events => { @@ -89,21 +80,6 @@ public static MauiApp CreateMauiApp() builder.Logging.AddDebug(); #endif - // Workaround for TouchEffect being lost when navigating multiple times or - // when closing the app (with OnBackButtonPressed()) and reopening the cached view. - Microsoft.Maui.Handlers.ElementHandler.ElementMapper.AppendToMapping("YosuElement", (handler, e) => - { - if (e is Element element) - { - var touchEffects = element.Effects.OfType().ToList(); - for (int i = 0; i < touchEffects.Count; i++) - { - element.Effects.Remove(touchEffects[i]); - element.Effects.Add(touchEffects[i]); - } - } - }); - // Views builder.Services.AddTransient(); builder.Services.AddTransient(); diff --git a/Yosu/Yosu.csproj b/Yosu/Yosu.csproj index 79f1ebf..31036f1 100644 --- a/Yosu/Yosu.csproj +++ b/Yosu/Yosu.csproj @@ -6,7 +6,7 @@ Yosu true - 7.0.59 + true @@ -47,29 +47,26 @@ - - - - - + - - - + + + - + - - - + + + +