Fix open group profile picture bug

This commit is contained in:
nielsandriesse 2020-06-19 09:20:03 +10:00
parent b8d713b834
commit 2e9dc8123d
2 changed files with 2 additions and 1 deletions

View File

@ -145,6 +145,7 @@ final class ConversationCell : UITableViewCell {
profilePictureView.isRSSFeed = true
} else if let openGroupProfilePicture = (threadViewModel.threadRecord as! TSGroupThread).groupModel.groupImage { // An open group with a profile picture
profilePictureView.openGroupProfilePicture = openGroupProfilePicture
profilePictureView.isRSSFeed = false
} else if (threadViewModel.threadRecord as! TSGroupThread).groupModel.groupType == .openGroup
|| (threadViewModel.threadRecord as! TSGroupThread).groupModel.groupType == .rssFeed { // An open group without a profile picture or an RSS feed
profilePictureView.hexEncodedPublicKey = ""

View File

@ -65,7 +65,7 @@ public final class ProfilePictureView : UIView {
}
guard hexEncodedPublicKey != nil || openGroupProfilePicture != nil else { return }
imageView.image = isRSSFeed ? nil : (openGroupProfilePicture ?? getProfilePicture(of: size, for: hexEncodedPublicKey))
imageView.backgroundColor = isRSSFeed ? UIColor(rgbHex: 0x353535) : UIColor(rgbHex: 0xD8D8D8) // UIColor(rgbHex: 0xD8D8D8) = Colors.unimportant
imageView.backgroundColor = isRSSFeed ? UIColor(rgbHex: 0x353535) : Colors.unimportant
imageView.layer.cornerRadius = size / 2
imageView.contentMode = isRSSFeed ? .center : .scaleAspectFit
if isRSSFeed {