Expose avatar background for a given content id from ElementColors (#209)

This commit is contained in:
ismailgulek
2022-09-23 17:12:28 +03:00
committed by GitHub
parent 74cab0fc0b
commit e9a272c120
2 changed files with 25 additions and 3 deletions
@@ -42,9 +42,7 @@ struct PlaceholderAvatarImage: View {
return .element.accent
}
let colors = Color.element.contentAndAvatars
let colorIndex = Int(contentId.hashCode % Int32(colors.count))
return Color.element.contentAndAvatars[colorIndex % colors.count]
return .element.avatarBackground(for: contentId)
}
}