Skip to content

Commit

Permalink
Prevent effects stripping by linker
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinBonilla committed Nov 21, 2023
1 parent 98ca4aa commit 00463d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MaterialDesignControls.Android/Effects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ public static class Effects

public static void Init()
{
// Prevent stripping by linker
new TouchAndPressEffect();
new TouchReleaseEffect();

_allEffects = new List<PlatformEffect>(typeof(Effects).Assembly.GetTypes()
.Where(t => typeof(PlatformEffect).IsAssignableFrom(t))
.Select(t => (PlatformEffect)Activator.CreateInstance(t)));
Expand Down
3 changes: 3 additions & 0 deletions src/MaterialDesignControls.iOS/Effects.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public static class Effects

public static void Init()
{
// Prevent stripping by linker
new TouchAndPressEffect();

_allEffects = new List<PlatformEffect>(typeof(Effects).Assembly.GetTypes()
.Where(t => typeof(PlatformEffect).IsAssignableFrom(t))
.Select(t => (PlatformEffect)Activator.CreateInstance(t)));
Expand Down

0 comments on commit 00463d4

Please sign in to comment.