Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ internal void Recycle()
RemoveView(platformView);
}

// Capture the current platform view before disconnecting handlers, because
// DisconnectHandlers() may null out the handler's PlatformView/ContainerView.
View?.DisconnectHandlers();

Content = null;
_pixelSize = null;
_reportMeasure = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@ public void Recycle(ItemsView itemsView)
}

itemsView.RemoveLogicalChild(View);

// Disconnect and clear the handler via ItemContentView.Recycle(), which calls
// DisconnectHandlers() before releasing Content. Reset _selectedTemplate so the
// next Bind() call always goes through the templateChanging path and recreates
// the handler (since we just disconnected it).
_itemContentView.Recycle();
View = null; // clear reference to the disconnected view
_selectedTemplate = null; // force templateChanging=true on next Bind() to recreate the view
}

public void Bind(object itemBindingContext, ItemsView itemsView,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !ANDROID
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
Expand Down Expand Up @@ -31,3 +32,4 @@ public void CollectionViewDisconnectsHandlersAfterNavigationBack()
"CollectionView should disconnect handlers from views belonging to the old DataTemplate after navigating back.");
}
}
#endif
Loading