fix bug, must find other solution later

Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
Matt Bruce 2024-03-21 11:20:11 -05:00
parent 7a533944b8
commit f862c8bd1c

View File

@ -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()
}
}
}
}