From ad7bf0dad6ac5570137ea348dd2df39a955c3ecb Mon Sep 17 00:00:00 2001 From: Nandhini Rajendran Date: Fri, 13 Sep 2024 17:02:21 +0530 Subject: [PATCH] Fix for showing pagingView when itemWidthPercent is less than 100 --- MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift index f84bdfc5..c48e5d80 100644 --- a/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift +++ b/MVMCoreUI/Atomic/Organisms/Carousel/Carousel.swift @@ -111,7 +111,7 @@ open class Carousel: View { /// Updates if the pager is visible or not. private func updatePagerVisibility() { guard let pagingView = pagingView else { return } - let shouldHidePager = collectionView.contentSize.width < bounds.width + let shouldHidePager = ((molecules?.count ?? 0) < 2) && (collectionView.contentSize.width < bounds.width) if (shouldHidePager && !pagingView.isHidden) || (!shouldHidePager && pagingView.isHidden) { pagingView.isHidden = shouldHidePager pagingBottomPin?.isActive = !shouldHidePager