Skip to content

Commit 1bdbcb3

Browse files
committed
Attempt fixing reuse issue for the overlays on the product tab table cells
1 parent f1427fb commit 1bdbcb3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

WooCommerce/Classes/ViewRelated/Products/Cells/ProductsTabProductTableViewCell.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,14 @@ final class ProductsTabProductTableViewCell: UITableViewCell {
5858
super.updateConfiguration(using: state)
5959
updateDefaultBackgroundConfiguration(using: state)
6060
}
61+
62+
override func prepareForReuse() {
63+
super.prepareForReuse()
64+
syncingOverlayView?.removeFromSuperview()
65+
selectedProductImageOverlayView?.removeFromSuperview()
66+
syncingOverlayView = nil
67+
selectedProductImageOverlayView = nil
68+
}
6169
}
6270

6371
extension ProductsTabProductTableViewCell: SearchResultCell {

0 commit comments

Comments
 (0)