Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Call LayoutIfNeeded on ObservableGroupedSource.Reload #15439

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -131,7 +131,7 @@ void CollectionChanged(object sender, NotifyCollectionChangedEventArgs args)
{
if (Device.IsInvokeRequired)
{
Device.BeginInvokeOnMainThread(() => CollectionChanged(args));
Device.BeginInvokeOnMainThread(() => CollectionChanged(args));
}
else
{
Expand Down Expand Up @@ -168,15 +168,7 @@ void Reload(bool collectionWasReset = false)
ResetGroupTracking();

_collectionView.ReloadData();

// I'm trying to modify as little as possible
// due to possible unpredictable consequences including perf. degradation
// https://github.com/xamarin/Xamarin.Forms/issues/13268
if (collectionWasReset)
{
_collectionView.LayoutIfNeeded();
}

_collectionView.LayoutIfNeeded();
_collectionView.CollectionViewLayout.InvalidateLayout();
}

Expand Down