Skip to content

Commit 3c54309

Browse files
https://github.com/AndreiMisiukevich/TouchEffect/issues/71
1 parent 4184268 commit 3c54309

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

TouchEffect/TouchEff.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ internal TouchEff(Func<TouchEff, TouchState, HoverState, int, CancellationToken,
3939

4040
public event AnimationStartedHandler AnimationStarted;
4141

42+
//The backdor for https://github.com/AndreiMisiukevich/TouchEffect/issues/71
43+
[EditorBrowsable(EditorBrowsableState.Advanced)]
44+
public static bool IsForceUpdateStateAnimatedForIsToggledProperty { get; set; }
45+
4246
public static readonly BindableProperty IsAvailableProperty = BindableProperty.CreateAttached(
4347
nameof(IsAvailable),
4448
typeof(bool),
@@ -424,7 +428,7 @@ internal TouchEff(Func<TouchEff, TouchState, HoverState, int, CancellationToken,
424428
BindingMode.TwoWay,
425429
propertyChanged: (bindable, oldValue, newValue) =>
426430
{
427-
bindable.GetTouchEff()?.ForceUpdateState(false);
431+
bindable.GetTouchEff()?.ForceUpdateState(IsForceUpdateStateAnimatedForIsToggledProperty);
428432
TryGenerateEffect(bindable, oldValue, newValue);
429433
});
430434

0 commit comments

Comments
 (0)