Skip to content

Commit

Permalink
chore: Adjust usages
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Mar 4, 2025
1 parent 5e1c893 commit 59ca47e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ public static class TraceProvider
/// The furthest item in the source which has already been materialized. Items up to this point can safely be retrieved.
/// </summary>
private NSIndexPath _lastMaterializedItem = NSIndexPath.FromRowSection(0, 0);


#if !MACCATALYST // Fix on .NET 6 Preview 6 https://github.com/unoplatform/uno/issues/5873
/// <summary>
/// Is the UICollectionView currently undergoing animated scrolling, either user-initiated or programmatic.
/// </summary>
private bool _isInAnimatedScroll;
#endif
#endregion

public ListViewBaseSource()
Expand Down Expand Up @@ -456,9 +458,9 @@ private UICollectionReusableView GetBindableSupplementaryView(
return supplementaryView;
}

#if !MACCATALYST // Fix on .NET 6 Preview 6 https://github.com/unoplatform/uno/issues/5873
internal void SetIsAnimatedScrolling() => _isInAnimatedScroll = true;

#if !MACCATALYST // Fix on .NET 6 Preview 6 https://github.com/unoplatform/uno/issues/5873
public override void Scrolled(UIScrollView scrollView)
{
InvokeOnScroll();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -627,10 +627,12 @@ private UICollectionViewScrollPosition ConvertScrollAlignmentForGroups(ScrollInt
public override void SetContentOffset(CGPoint contentOffset, bool animated)
{
base.SetContentOffset(contentOffset, animated);
#if !MACCATALYST // Fix on .NET 6 Preview 6 https://github.com/unoplatform/uno/issues/5873
if (animated)
{
Source?.SetIsAnimatedScrolling();
}
#endif
}

/// <summary>
Expand Down

0 comments on commit 59ca47e

Please sign in to comment.