removed property
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
f3b9999e34
commit
3d94e7d7c4
@ -16,7 +16,6 @@ open class Control<ModelType: Modelable>: UIControl, ModelHandlerable, ViewProto
|
||||
// MARK: - Combine Properties
|
||||
//--------------------------------------------------
|
||||
@Published public var model: ModelType = ModelType()
|
||||
public var modelPublished: Published<ModelType> { _model }
|
||||
public var modelPublisher: Published<ModelType>.Publisher { $model }
|
||||
public var subscribers = Set<AnyCancellable>()
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@ open class View<ModelType: Modelable>: UIView, ModelHandlerable, ViewProtocol, R
|
||||
// MARK: - Combine Properties
|
||||
//--------------------------------------------------
|
||||
@Published public var model: ModelType = ModelType()
|
||||
public var modelPublished: Published<ModelType> { _model }
|
||||
public var modelPublisher: Published<ModelType>.Publisher { $model }
|
||||
public var subscribers = Set<AnyCancellable>()
|
||||
|
||||
|
||||
@ -18,7 +18,6 @@ open class LabelBase<ModelType: LabelModel>: UILabel, ModelHandlerable, ViewProt
|
||||
// MARK: - Combine Properties
|
||||
//--------------------------------------------------
|
||||
@Published public var model: ModelType = ModelType()
|
||||
public var modelPublished: Published<ModelType> { _model }
|
||||
public var modelPublisher: Published<ModelType>.Publisher { $model }
|
||||
public var subscribers = Set<AnyCancellable>()
|
||||
|
||||
|
||||
@ -11,10 +11,8 @@ import Combine
|
||||
public protocol ModelHandlerable: AnyObject {
|
||||
associatedtype ModelType: Modelable
|
||||
var model: ModelType { get set }
|
||||
var modelPublished: Published<ModelType> { get }
|
||||
var modelPublisher: Published<ModelType>.Publisher { get }
|
||||
var subscribers: Set<AnyCancellable> { get set }
|
||||
|
||||
init(with model: ModelType)
|
||||
func set(with model: ModelType)
|
||||
func shouldUpdateView(viewModel: ModelType) -> Bool
|
||||
@ -39,7 +37,6 @@ extension ModelHandlerable {
|
||||
.debounce(for: .seconds(Constants.ModelStateDebounce), scheduler: RunLoop.main)
|
||||
.sink { [weak self] viewModel in
|
||||
self?.updateView(viewModel: viewModel)
|
||||
|
||||
}
|
||||
.store(in: &subscribers)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user