robohash avatars

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-05-28 08:31:53 -07:00
parent 200cbe3728
commit cc95931dec
4 changed files with 32 additions and 13 deletions

View File

@@ -75,8 +75,8 @@ struct ProfilePicView: View {
var MainContent: some View {
Group {
let picture = picture ?? profiles.lookup(id: pubkey)?.picture
if let pic_url = picture.flatMap { URL(string: $0) } {
let picture = picture ?? profiles.lookup(id: pubkey)?.picture ?? "https://robohash.org/\(pubkey).png"
if let pic_url = URL(string: picture) {
ProfilePic(pic_url)
} else {
Placeholder