From ba6c0a3975b1d8b624944da1c544468b69d636b9 Mon Sep 17 00:00:00 2001 From: Ieuan Walker Date: Tue, 5 Nov 2024 14:43:35 +0000 Subject: [PATCH] Fix merge dictionary (#285) --- .../Utils/ResourceLoader.shared.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/SkiaSharp.Extended.UI.Maui/Utils/ResourceLoader.shared.cs b/source/SkiaSharp.Extended.UI.Maui/Utils/ResourceLoader.shared.cs index f199725a..8c12ed0d 100644 --- a/source/SkiaSharp.Extended.UI.Maui/Utils/ResourceLoader.shared.cs +++ b/source/SkiaSharp.Extended.UI.Maui/Utils/ResourceLoader.shared.cs @@ -3,12 +3,9 @@ internal static class ResourceLoader where T : ResourceDictionary, new() { - private static bool registered; - internal static void EnsureRegistered(VisualElement? element = null) { - if (registered) - return; + bool registered = false; // try register with the current app var merged = Application.Current?.Resources?.MergedDictionaries;