From 7ad09468e227a0324cde6a8db35069b14787d4da Mon Sep 17 00:00:00 2001 From: CMK Date: Fri, 5 Mar 2021 19:30:17 +0800 Subject: [PATCH] fix: set image missing corner radius --- .../PickServer/TableViewCell/PickServerCell.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift b/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift index 6e36651fb..52133c4ba 100644 --- a/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift +++ b/Mastodon/Scene/Onboarding/PickServer/TableViewCell/PickServerCell.swift @@ -7,7 +7,7 @@ import UIKit import MastodonSDK -import Kingfisher +import AlamofireImage import Kanna protocol PickServerCellDelegate: class { @@ -362,9 +362,11 @@ extension PickServerCell { guard let serverInfo = server else { return } thumbnailActivityIdicator.startAnimating() + let placeholderImage = UIImage.placeholder(color: .systemFill).af.imageRounded(withCornerRadius: 3.0, divideRadiusByImageScale: true) thumbnailImageView.af.setImage( withURL: URL(string: serverInfo.proxiedThumbnail ?? "")!, - placeholderImage: UIImage.placeholder(color: .systemFill), + placeholderImage: placeholderImage, + filter: AspectScaledToFillSizeWithRoundedCornersFilter(size: thumbnailImageView.frame.size, radius: 3), imageTransition: .crossDissolve(0.33), completion: { [weak self] response in guard let self = self else { return }