Skip to content

Commit

Permalink
Merge pull request #307 from BurhanDewantara/1.8.7-custom
Browse files Browse the repository at this point in the history
Prevent incorrect skeletonLayer to be added when updating skeleton
  • Loading branch information
Juanpe authored Aug 6, 2020
2 parents 65e8605 + d945179 commit 38f9379
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file
* [**286**](https://github.com/Juanpe/SkeletonView/pull/286): Fix issue when WKWebView calls skeletonLayoutSubviews not on the main thread - [@paulanatoleclaudot-betclic](https://github.com/paulanatoleclaudot-betclic)
* [**292**](https://github.com/Juanpe/SkeletonView/pull/292): Fix IBInspectable support when using Carthage - [@marisalaneous](https://github.com/marisalaneous)
* [**308**](https://github.com/Juanpe/SkeletonView/pull/308): Fix example backgroundColor in DarkMode - [@toshi0383](https://github.com/toshi0383)
* Prevent incorrect skeletonLayer to be added when updating skeleton

### 📦 [1.8.7](https://github.com/Juanpe/SkeletonView/releases/tag/1.8.7)

Expand Down
3 changes: 2 additions & 1 deletion Sources/SkeletonView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ extension UIView {
currentSkeletonConfig = config
updateDummyDataSourceIfNeeded()
subviewsSkeletonables.recursiveSearch(leafBlock: {
if skeletonLayer?.type != config.type {
if let skeletonLayer = skeletonLayer,
skeletonLayer.type != config.type {
removeSkeletonLayer()
addSkeletonLayer(skeletonConfig: config)
} else {
Expand Down

0 comments on commit 38f9379

Please sign in to comment.