Skip to content

Commit

Permalink
https://github.com/AndreiMisiukevich/TouchEffect/issues/71
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiMisiukevich committed Jul 14, 2020
1 parent 4184268 commit 3c54309
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion TouchEffect/TouchEff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ internal TouchEff(Func<TouchEff, TouchState, HoverState, int, CancellationToken,

public event AnimationStartedHandler AnimationStarted;

//The backdor for https://github.com/AndreiMisiukevich/TouchEffect/issues/71
[EditorBrowsable(EditorBrowsableState.Advanced)]
public static bool IsForceUpdateStateAnimatedForIsToggledProperty { get; set; }

public static readonly BindableProperty IsAvailableProperty = BindableProperty.CreateAttached(
nameof(IsAvailable),
typeof(bool),
Expand Down Expand Up @@ -424,7 +428,7 @@ internal TouchEff(Func<TouchEff, TouchState, HoverState, int, CancellationToken,
BindingMode.TwoWay,
propertyChanged: (bindable, oldValue, newValue) =>
{
bindable.GetTouchEff()?.ForceUpdateState(false);
bindable.GetTouchEff()?.ForceUpdateState(IsForceUpdateStateAnimatedForIsToggledProperty);
TryGenerateEffect(bindable, oldValue, newValue);
});

Expand Down

0 comments on commit 3c54309

Please sign in to comment.