Fix avatars being squished in certain places

Closes #414
This commit is contained in:
Shadowfacts 2023-06-26 20:47:38 -07:00
parent 4182c15500
commit 2e7ad1626e
5 changed files with 5 additions and 1 deletions

View File

@ -146,7 +146,7 @@ class ActionNotificationGroupCollectionViewCell: UICollectionViewListCell {
avatarStack.arrangedSubviews.forEach { $0.removeFromSuperview() }
for avatarURL in people.lazy.compactMap(\.avatar).prefix(10) {
let imageView = CachedImageView(cache: .avatars)
imageView.contentMode = .scaleAspectFit
imageView.contentMode = .scaleAspectFill
imageView.layer.masksToBounds = true
imageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 30
imageView.layer.cornerCurve = .continuous

View File

@ -121,6 +121,7 @@ class FollowNotificationGroupCollectionViewCell: UICollectionViewListCell {
avatarStack.arrangedSubviews.forEach { $0.removeFromSuperview() }
for avatarURL in people.lazy.compactMap(\.avatar).prefix(10) {
let imageView = CachedImageView(cache: .avatars)
imageView.contentMode = .scaleAspectFill
imageView.layer.masksToBounds = true
imageView.layer.cornerRadius = Preferences.shared.avatarStyle.cornerRadiusFraction * 30
imageView.layer.cornerCurve = .continuous

View File

@ -20,6 +20,7 @@ class FollowRequestNotificationCollectionViewCell: UICollectionViewListCell {
}
private let avatarImageView = CachedImageView(cache: .avatars).configure {
$0.contentMode = .scaleAspectFill
$0.layer.masksToBounds = true
$0.layer.cornerCurve = .continuous
NSLayoutConstraint.activate([

View File

@ -28,6 +28,7 @@ class ConversationMainStatusCollectionViewCell: UICollectionViewListCell, Status
private static let avatarImageViewSize: CGFloat = 50
private(set) lazy var avatarImageView = CachedImageView(cache: .avatars).configure {
$0.contentMode = .scaleAspectFill
$0.layer.masksToBounds = true
$0.layer.cornerCurve = .continuous
NSLayoutConstraint.activate([

View File

@ -75,6 +75,7 @@ class TimelineStatusCollectionViewCell: UICollectionViewListCell, StatusCollecti
private static let avatarImageViewSize: CGFloat = 50
private(set) lazy var avatarImageView = CachedImageView(cache: .avatars).configure {
$0.contentMode = .scaleAspectFill
$0.layer.masksToBounds = true
$0.layer.cornerCurve = .continuous
NSLayoutConstraint.activate([