From 2e9dc8123de4a6dd4dd5f7a849c0d890dbc7ad31 Mon Sep 17 00:00:00 2001 From: nielsandriesse Date: Fri, 19 Jun 2020 09:20:03 +1000 Subject: [PATCH] Fix open group profile picture bug --- Signal/src/Loki/Components/ConversationCell.swift | 1 + .../Loki/Redesign/Components/ProfilePictureView.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Signal/src/Loki/Components/ConversationCell.swift b/Signal/src/Loki/Components/ConversationCell.swift index e5b1f2641..2c7842ac6 100644 --- a/Signal/src/Loki/Components/ConversationCell.swift +++ b/Signal/src/Loki/Components/ConversationCell.swift @@ -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 = "" diff --git a/SignalMessaging/Loki/Redesign/Components/ProfilePictureView.swift b/SignalMessaging/Loki/Redesign/Components/ProfilePictureView.swift index 3f5e90bd9..ee5301c4c 100644 --- a/SignalMessaging/Loki/Redesign/Components/ProfilePictureView.swift +++ b/SignalMessaging/Loki/Redesign/Components/ProfilePictureView.swift @@ -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 {