Skip to content

Commit

Permalink
https://github.com/AndreiMisiukevich/CardView/issues/359
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiMisiukevich committed Nov 3, 2020
1 parent 7bdc0cc commit 0071d09
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
9 changes: 2 additions & 7 deletions PanCardView/CardsView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -771,7 +765,8 @@ await Task.WhenAll(
}
catch
{
rollbackAction?.Invoke();
Opacity = opacity;
Scale = scale;
}
}

Expand Down
2 changes: 1 addition & 1 deletion PanCardView/Controls/TabsControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ private void UpdateStripePositionNonBatch()
affectedIndex = affectedIndex.ToCyclicalIndex(itemsCount);
}

if (affectedIndex < 0 || affectedIndex >= itemsCount)
if (affectedIndex < 0 || affectedIndex >= ItemsStackLayout.Children.Count)
{
return;
}
Expand Down

0 comments on commit 0071d09

Please sign in to comment.