From f862c8bd1ce326aefdecf20fa7c54b6749331dff Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 21 Mar 2024 11:20:11 -0500 Subject: [PATCH] fix bug, must find other solution later Signed-off-by: Matt Bruce --- VDS/Components/Breadcrumbs/Breadcrumbs.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/VDS/Components/Breadcrumbs/Breadcrumbs.swift b/VDS/Components/Breadcrumbs/Breadcrumbs.swift index ad2f20de..0ed7585d 100644 --- a/VDS/Components/Breadcrumbs/Breadcrumbs.swift +++ b/VDS/Components/Breadcrumbs/Breadcrumbs.swift @@ -122,14 +122,17 @@ open class Breadcrumbs: View { } open override func layoutSubviews() { - //Don't call super since we don't want an infinite loop - //super.layoutSubviews() - + //Turn off the ability to execute updateView() in the super + //since we don't want an infinite loop + shouldUpdateView = false + super.layoutSubviews() + shouldUpdateView = true + // Accounts for any collection size changes DispatchQueue.main.async { [weak self] in guard let self else { return } self.collectionView.collectionViewLayout.invalidateLayout() - } + } } }