cancelled the previous subscription
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
c93a270b1a
commit
ae431b8b2b
@ -26,7 +26,13 @@ open class Toggle: ToggleBase, VDSMoleculeViewProtocol {
|
||||
public var viewModel: ToggleModel!
|
||||
public var delegateObject: MVMCoreUIDelegateObject?
|
||||
public var additionalData: [AnyHashable: Any]?
|
||||
public var valueChangedSubscription: AnyCancellable?
|
||||
public var valueChangedSubscription: AnyCancellable? {
|
||||
willSet{
|
||||
if let current = valueChangedSubscription {
|
||||
current.cancel()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializers
|
||||
|
||||
Loading…
Reference in New Issue
Block a user