|
@ -15,18 +15,22 @@ struct EventView: View { |
|
|
|
|
|
|
|
|
var body: some View { |
|
|
var body: some View { |
|
|
HStack { |
|
|
HStack { |
|
|
if let pic = profile?.picture.flatMap { URL(string: $0) } { |
|
|
VStack { |
|
|
CachedAsyncImage(url: pic) { img in |
|
|
if let pic = profile?.picture.flatMap { URL(string: $0) } { |
|
|
img.resizable() |
|
|
CachedAsyncImage(url: pic) { img in |
|
|
} placeholder: { |
|
|
img.resizable() |
|
|
|
|
|
} placeholder: { |
|
|
|
|
|
Color.purple.opacity(0.1) |
|
|
|
|
|
} |
|
|
|
|
|
.frame(width: PFP_SIZE, height: PFP_SIZE) |
|
|
|
|
|
.cornerRadius(CORNER_RADIUS) |
|
|
|
|
|
} else { |
|
|
Color.purple.opacity(0.1) |
|
|
Color.purple.opacity(0.1) |
|
|
|
|
|
.frame(width: PFP_SIZE, height: PFP_SIZE) |
|
|
|
|
|
.cornerRadius(CORNER_RADIUS) |
|
|
} |
|
|
} |
|
|
.frame(width: PFP_SIZE, height: PFP_SIZE, alignment: .top) |
|
|
|
|
|
.cornerRadius(CORNER_RADIUS) |
|
|
Spacer() |
|
|
} else { |
|
|
|
|
|
Color.purple.opacity(0.1) |
|
|
|
|
|
.frame(width: PFP_SIZE, height: PFP_SIZE, alignment: .top) |
|
|
|
|
|
.cornerRadius(CORNER_RADIUS) |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
VStack { |
|
|
VStack { |
|
@ -39,10 +43,13 @@ struct EventView: View { |
|
|
Text(event.content) |
|
|
Text(event.content) |
|
|
.textSelection(.enabled) |
|
|
.textSelection(.enabled) |
|
|
.frame(maxWidth: .infinity, alignment: .leading) |
|
|
.frame(maxWidth: .infinity, alignment: .leading) |
|
|
|
|
|
|
|
|
|
|
|
Spacer() |
|
|
|
|
|
|
|
|
Divider() |
|
|
Divider() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
.frame(minHeight: PFP_SIZE) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|