updated to point to publisher

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2022-08-12 15:28:52 -05:00
parent 552e0416d3
commit ce9b19cdfc

View File

@ -93,7 +93,7 @@ open class SelectorGroupBase<SelectorType, SelectorGroupType: SelectorGroupModel
}.store(in: &subscribers)
//add model update to the subscribers
newSelectorView.$model.debounce(for: .seconds(Constants.ModelStateDebounce), scheduler: RunLoop.main).sink { [weak self] model in
newSelectorView.modelPublisher.debounce(for: .seconds(Constants.ModelStateDebounce), scheduler: RunLoop.main).sink { [weak self] model in
if let cached = self?.getCachedSelector(viewModel: model), newSelectorView.shouldUpdateView(viewModel: cached) {
self?.replace(viewModel: model)
}