removed filter

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-08-15 17:45:51 -05:00
parent c2a9fecd3b
commit b3483053f6
2 changed files with 2 additions and 5 deletions

View File

@ -190,7 +190,7 @@ open class SelectorBase<ModelType: SelectorModel>: Control<ModelType>, Changable
func updateLabels(_ viewModel: ModelType) {
//deal with labels
if model.shouldShowLabels {
if viewModel.shouldShowLabels {
//add the stackview to hold the 2 labels
//top label
if let labelModel = viewModel.labelModel {

View File

@ -23,6 +23,7 @@ extension ModelHandlerable {
public func set(with model: ModelType) {
if shouldUpdateView(viewModel: model){
print("\(Self.self) updateView(viewModel)")
updateView(viewModel: model)
self.model = model
}
@ -30,10 +31,6 @@ extension ModelHandlerable {
public func setupUpdateView() {
modelPublisher
.filter { [weak self] viewModel in
return self?.shouldUpdateView(viewModel: viewModel) ?? false
}
.debounce(for: .seconds(Constants.ModelStateDebounce), scheduler: RunLoop.main)
.sink { [weak self] viewModel in
self?.updateView(viewModel: viewModel)