fix: set image missing corner radius

This commit is contained in:
CMK 2021-03-05 19:30:17 +08:00
parent 54292d6b6a
commit 7ad09468e2
1 changed files with 4 additions and 2 deletions

View File

@ -7,7 +7,7 @@
import UIKit import UIKit
import MastodonSDK import MastodonSDK
import Kingfisher import AlamofireImage
import Kanna import Kanna
protocol PickServerCellDelegate: class { protocol PickServerCellDelegate: class {
@ -362,9 +362,11 @@ extension PickServerCell {
guard let serverInfo = server else { return } guard let serverInfo = server else { return }
thumbnailActivityIdicator.startAnimating() thumbnailActivityIdicator.startAnimating()
let placeholderImage = UIImage.placeholder(color: .systemFill).af.imageRounded(withCornerRadius: 3.0, divideRadiusByImageScale: true)
thumbnailImageView.af.setImage( thumbnailImageView.af.setImage(
withURL: URL(string: serverInfo.proxiedThumbnail ?? "")!, withURL: URL(string: serverInfo.proxiedThumbnail ?? "")!,
placeholderImage: UIImage.placeholder(color: .systemFill), placeholderImage: placeholderImage,
filter: AspectScaledToFillSizeWithRoundedCornersFilter(size: thumbnailImageView.frame.size, radius: 3),
imageTransition: .crossDissolve(0.33), imageTransition: .crossDissolve(0.33),
completion: { [weak self] response in completion: { [weak self] response in
guard let self = self else { return } guard let self = self else { return }