Skip to content

Commit

Permalink
[BugFix] Fix issue when WKWebView calls skeletonLayoutSubviews not on…
Browse files Browse the repository at this point in the history
… the main thread
  • Loading branch information
paulanatoleclaudot-betclic committed Apr 17, 2020
1 parent d09a5d7 commit 1f81365
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file
#### 🔬Improvements

#### 🩹 Bug fixes
* [**271**](https://github.com/Juanpe/SkeletonView/pull/271): Fix issue when WKWebView calls skeletonLayoutSubviews not on the main thread - [@paulanatoleclaudot-betclic](https://github.com/paulanatoleclaudot-betclic)

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

Expand Down
1 change: 1 addition & 0 deletions Sources/SkeletonView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public extension UIView {

extension UIView {
@objc func skeletonLayoutSubviews() {
guard Thread.isMainThread else { return }
skeletonLayoutSubviews()
guard isSkeletonActive else { return }
layoutSkeletonIfNeeded()
Expand Down

0 comments on commit 1f81365

Please sign in to comment.