diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift index 90fb0af1..972ea7ca 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/BarsIndicatorView.swift @@ -134,6 +134,7 @@ open class BarsIndicatorView: CarouselIndicator { public override func assessTouchOf(_ touchPoint_X: CGFloat) { currentIndex = barReferences.firstIndex { $0.0.frame.maxX >= touchPoint_X && $0.0.frame.minX <= touchPoint_X } ?? 0 + performAction() } open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { @@ -142,14 +143,6 @@ open class BarsIndicatorView: CarouselIndicator { guard let model = model as? BarsCarouselIndicatorModel else { return } currentIndicatorColor = model.currentIndicatorColor.uiColor - - if barReferences.isEmpty { - generateBars() - updateUI(previousIndex: previousIndex, - newIndex: currentIndex, - totalCount: numberOfPages, - isAnimated: false) - } } //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift index d1f12d85..9380e8c0 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/CarouselIndicator.swift @@ -48,13 +48,10 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { previousIndex = currentIndex carouselIndicatorModel?.currentIndex = newIndex - if previousIndex != newIndex { - updateUI(previousIndex: previousIndex, - newIndex: newIndex, - totalCount: numberOfPages, - isAnimated: carouselIndicatorModel?.animated ?? true) - performAction() - } + updateUI(previousIndex: previousIndex, + newIndex: newIndex, + totalCount: numberOfPages, + isAnimated: carouselIndicatorModel?.animated ?? true) } } @@ -141,11 +138,13 @@ open class CarouselIndicator: Control, CarouselPageControlProtocol { func incrementCurrentIndex() { currentIndex = (currentIndex + 1) % numberOfPages + performAction() } func decrementCurrentIndex() { let newIndex = currentIndex - 1 currentIndex = newIndex < 0 ? numberOfPages - 1 : newIndex + performAction() } /// Increments the currentIndex value. diff --git a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift index e4ac2fe4..3585be05 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CarouselIndicator/NumericIndicatorView.swift @@ -113,17 +113,6 @@ open class NumericIndicatorView: CarouselIndicator { leftArrow.setNeedsDisplay() } - open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { - super.set(with: model, delegateObject, additionalData) - - if pageCount.text?.isEmpty == nil { - updateUI(previousIndex: previousIndex, - newIndex: currentIndex, - totalCount: numberOfPages, - isAnimated: false) - } - } - //-------------------------------------------------- // MARK: - IndicatorViewProtocol //--------------------------------------------------