diff --git a/PanCardView/CardsView.cs b/PanCardView/CardsView.cs index fe4ebab..d64ae81 100644 --- a/PanCardView/CardsView.cs +++ b/PanCardView/CardsView.cs @@ -749,12 +749,6 @@ protected virtual async Task HardSetAsync() var scale = Scale; var time = 150u; - var rollbackAction = new Action(() => - { - Opacity = opacity; - Scale = scale; - }); - try { await Task.WhenAll( @@ -771,7 +765,8 @@ await Task.WhenAll( } catch { - rollbackAction?.Invoke(); + Opacity = opacity; + Scale = scale; } } diff --git a/PanCardView/Controls/TabsControl.cs b/PanCardView/Controls/TabsControl.cs index ec9b1bc..f4566af 100644 --- a/PanCardView/Controls/TabsControl.cs +++ b/PanCardView/Controls/TabsControl.cs @@ -396,7 +396,7 @@ private void UpdateStripePositionNonBatch() affectedIndex = affectedIndex.ToCyclicalIndex(itemsCount); } - if (affectedIndex < 0 || affectedIndex >= itemsCount) + if (affectedIndex < 0 || affectedIndex >= ItemsStackLayout.Children.Count) { return; }