Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Commit

Permalink
removed DispatchQueue from image render
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Rabelo <[email protected]>
  • Loading branch information
victorrabelozup committed Sep 29, 2020
1 parent 604319f commit be65ea3
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ extension Image: Widget {
switch result {
case .success(let data):
let image = UIImage(data: data)
DispatchQueue.main.async {
imageView.image = image
controller?.setNeedsLayout(component: imageView)
}
imageView.image = image
controller?.setNeedsLayout(component: imageView)
case .failure:
imageView.image = placeholderImage
controller?.setNeedsLayout(component: imageView)
Expand Down

0 comments on commit be65ea3

Please sign in to comment.