Add missing ProfileObserver to EventProfileName view

It was noticed that occasionally the profile name at the event view
would not load to the user's display name.

The issue was fixed by adding a missing profile observer.

Issue introduced after our last public release, no need for changelog
entries.

Changelog-None
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-10-31 10:42:09 -07:00
parent a8202d89f8
commit 01150155ab

View File

@@ -17,6 +17,7 @@ struct EventProfileName: View {
@State var nip05: NIP05? @State var nip05: NIP05?
@State var donation: Int? @State var donation: Int?
@State var purple_account: DamusPurple.Account? @State var purple_account: DamusPurple.Account?
@StateObject private var profileObserver: ProfileObserver
let size: EventViewKind let size: EventViewKind
@@ -27,6 +28,7 @@ struct EventProfileName: View {
let donation = damus.ndb.lookup_profile(pubkey)?.map({ p in p?.profile?.damus_donation }).value let donation = damus.ndb.lookup_profile(pubkey)?.map({ p in p?.profile?.damus_donation }).value
self._donation = State(wrappedValue: donation) self._donation = State(wrappedValue: donation)
self.purple_account = nil self.purple_account = nil
self._profileObserver = StateObject.init(wrappedValue: ProfileObserver(pubkey: pubkey, damusState: damus))
} }
var friend_type: FriendType? { var friend_type: FriendType? {