From 69ada51809eb32e877f505f2e0d360da6eecb2b8 Mon Sep 17 00:00:00 2001 From: Elfred Pagan Date: Wed, 6 Mar 2024 03:04:43 -0600 Subject: [PATCH] Change var to uninitialized let (#123) Co-authored-by: Elfred Pagan --- MagazineLayout/Public/MagazineLayout.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MagazineLayout/Public/MagazineLayout.swift b/MagazineLayout/Public/MagazineLayout.swift index 79bc603..8b85af9 100755 --- a/MagazineLayout/Public/MagazineLayout.swift +++ b/MagazineLayout/Public/MagazineLayout.swift @@ -589,7 +589,7 @@ public final class MagazineLayout: UICollectionViewLayout { // When using the topToBottom layout direction, we only want to invalidate the layout when the // widths differ. When using the bottomToTop layout direction, we want to invalidate on any // size change due to the requirement of needing to preserve scroll position from the bottom - var shouldInvalidateDueToSize = false + let shouldInvalidateDueToSize: Bool switch verticalLayoutDirection { case .topToBottom: shouldInvalidateDueToSize = !currentCollectionView.bounds.size.width.isEqual(