Change how avatars are selected so that poor quality avatars are passed up for their feed favicon

This commit is contained in:
Maurice Parker
2019-04-29 05:51:47 -05:00
parent 2e178dbebc
commit da8c40d38f
2 changed files with 27 additions and 12 deletions

View File

@@ -191,9 +191,7 @@ private extension MasterTimelineTableViewCell {
func updateAvatar() {
// The avatar should be bigger than a favicon. Theyre too small; they look weird.
let minDimension = 22.0 * RSScreen.mainScreenScale
guard let image = cellData.avatar, cellData.showAvatar, image.size.height >= minDimension, image.size.width >= minDimension else {
guard let image = cellData.avatar, cellData.showAvatar else {
makeAvatarEmpty()
return
}
@@ -202,7 +200,7 @@ private extension MasterTimelineTableViewCell {
avatarImageView.layer.cornerRadius = MasterTimelineCellLayout.avatarCornerRadius
avatarImageView.clipsToBounds = true
if avatarImageView.image !== image {
if avatarImageView.image !== cellData.avatar {
avatarImageView.image = image
setNeedsLayout()
}