Merge pull request #275 from BurhanDewantara/259
Fix Issue #259: Prevent isSkeletonActive to be called when isSkeletonable is false
This commit is contained in:
@@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file
|
||||
#### 🔬Improvements
|
||||
|
||||
#### 🩹 Bug fixes
|
||||
* [**259**](https://github.com/Juanpe/SkeletonView/issues/259): Prevent isSkeletonActive to be called when isSkeletonable is false
|
||||
|
||||
### 📦 [1.8.6](https://github.com/Juanpe/SkeletonView/releases/tag/1.8.6)
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ extension UIView {
|
||||
|
||||
@objc func skeletonTraitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||
skeletonTraitCollectionDidChange(previousTraitCollection)
|
||||
guard isSkeletonActive, let config = currentSkeletonConfig else { return }
|
||||
guard isSkeletonable, isSkeletonActive, let config = currentSkeletonConfig else { return }
|
||||
updateSkeleton(skeletonConfig: config)
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ extension UIView {
|
||||
}
|
||||
|
||||
private func recursiveShowSkeleton(skeletonConfig config: SkeletonConfig, root: UIView? = nil) {
|
||||
guard !isSkeletonActive && isSkeletonable else { return }
|
||||
guard isSkeletonable && !isSkeletonActive else { return }
|
||||
currentSkeletonConfig = config
|
||||
swizzleLayoutSubviews()
|
||||
swizzleTraitCollectionDidChange()
|
||||
|
||||
Reference in New Issue
Block a user