Browse Source

use CachedAsyncImage for pfps

Signed-off-by: William Casarin <jb55@jb55.com>
profiles-everywhere
William Casarin 3 years ago
parent
commit
1f046ac021
  1. 3
      damus/Views/EventView.swift

3
damus/Views/EventView.swift

@ -7,6 +7,7 @@
import Foundation
import SwiftUI
import CachedAsyncImage
struct EventView: View {
let event: NostrEvent
@ -15,7 +16,7 @@ struct EventView: View {
var body: some View {
HStack {
if let pic = profile?.picture.flatMap { URL(string: $0) } {
AsyncImage(url: pic) { img in
CachedAsyncImage(url: pic) { img in
img.resizable()
} placeholder: {
Color.purple.opacity(0.1)

Loading…
Cancel
Save