File tree Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Expand file tree Collapse file tree 2 files changed +11
-14
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ extension CellHighlightAnimation where Self == DisabledCellHighlightAnimation {
53
53
}
54
54
}
55
55
56
+ import Combine
57
+
56
58
open class VersatileCell : UICollectionViewCell {
57
59
58
60
open override var isHighlighted : Bool {
@@ -68,6 +70,9 @@ open class VersatileCell: UICollectionViewCell {
68
70
69
71
private var _highlightAnimation : any CellHighlightAnimation = . disabled
70
72
73
+ /// In prepareForReuse this is going to be a new instance.
74
+ public private( set) var reusableCancellables : Set < AnyCancellable > = . init( )
75
+
71
76
public override init (
72
77
frame: CGRect
73
78
) {
@@ -91,6 +96,12 @@ open class VersatileCell: UICollectionViewCell {
91
96
}
92
97
}
93
98
99
+ open override func prepareForReuse( ) {
100
+ super. prepareForReuse ( )
101
+
102
+ reusableCancellables = . init( )
103
+ }
104
+
94
105
open override var configurationState : UICellConfigurationState {
95
106
let state = super. configurationState
96
107
return state
You can’t perform that action at this time.
0 commit comments