Skip to content

Commit

Permalink
rewrite image downloader
Browse files Browse the repository at this point in the history
  • Loading branch information
bourvill committed Jan 8, 2017
1 parent 991f91d commit acadf25
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wallabag/Cell/ArticleTableViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ArticleTableViewCell: ThemedTableViewCell {
if let picture = article.preview_picture {
previewImage.image(fromString: picture)
} else {
previewImage.image = UIImage(named: "logo-icon-black-no-bg")
previewImage.image = #imageLiteral(resourceName: "logo-icon-black-no-bg")
}

readingTime.text = "Reading time \(article.reading_time.readingTime)"
Expand Down
3 changes: 1 addition & 2 deletions wallabag/Lib/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ extension UIImageView {

public func image(fromString urlString: String) {
ImageDownloader.downloadImage(fromString: urlString) { image in
DispatchQueue.main.async() { () -> Void in
DispatchQueue.main.async {
self.image = image.crop(to: self.frame.size)
}
}
}

}

0 comments on commit acadf25

Please sign in to comment.