make robohash a function

Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
William Casarin
2022-08-06 13:52:36 -07:00
parent 03748a2b02
commit 7da7bcdfd5
2 changed files with 6 additions and 2 deletions

View File

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