From 3ed1963186665198d0d0374c0ce0ba316f34cbad Mon Sep 17 00:00:00 2001 From: Gerald Versluis Date: Fri, 24 Jun 2022 15:28:44 +0200 Subject: [PATCH] Update ObservableGroupedSource.cs --- .../CollectionView/ObservableGroupedSource.cs | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/Xamarin.Forms.Platform.iOS/CollectionView/ObservableGroupedSource.cs b/Xamarin.Forms.Platform.iOS/CollectionView/ObservableGroupedSource.cs index c472833fa24..85c01c7a95c 100644 --- a/Xamarin.Forms.Platform.iOS/CollectionView/ObservableGroupedSource.cs +++ b/Xamarin.Forms.Platform.iOS/CollectionView/ObservableGroupedSource.cs @@ -131,7 +131,7 @@ void CollectionChanged(object sender, NotifyCollectionChangedEventArgs args) { if (Device.IsInvokeRequired) { - Device.BeginInvokeOnMainThread(() => CollectionChanged(args)); + Device.BeginInvokeOnMainThread(() => CollectionChanged(args)); } else { @@ -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(); }