Use new decorative colours for avatars and displaynames. (#2438)

This commit is contained in:
Doug
2024-02-09 11:15:57 +00:00
committed by GitHub
parent 2597f6db41
commit cc1d9cad58
130 changed files with 256 additions and 256 deletions
@@ -31,7 +31,7 @@ struct PlaceholderAvatarImage: View {
// This text's frame doesn't look right when redacted
if redactionReasons != .placeholder {
Text(textForImage)
.foregroundColor(avatarColor?.foreground ?? .white)
.foregroundColor(avatarColor?.text ?? .white)
.font(.system(size: geometry.size.width * 0.5625, weight: .semibold))
.minimumScaleFactor(0.001)
.frame(alignment: .center)
@@ -55,12 +55,12 @@ struct PlaceholderAvatarImage: View {
return avatarColor?.background ?? .compound.iconPrimary
}
private var avatarColor: AvatarColor? {
private var avatarColor: DecorativeColor? {
guard let contentID else {
return nil
}
return Color.compound.avatarColor(for: contentID)
return Color.compound.decorativeColor(for: contentID)
}
}