What is Nostr?
jb55 / Will
npub1xts…kk5s
2023-06-10 10:48:56
in reply to nevent1q…rwcr

jb55 on Nostr: montzstar nice! Some comments: > diff --git ...

montzstar (npub1qlk…yayc) nice! Some comments:

> diff --git a/damus/Views/Relays/RelayDetailView.swift b/damus/Views/Relays/RelayDetailView.swift
> index c53bc123..7606799d 100644
> --- a/damus/Views/Relays/RelayDetailView.swift
> +++ b/damus/Views/Relays/RelayDetailView.swift
> @@ -12,8 +12,18 @@ struct RelayDetailView: View {
> let relay: String
> let nip11: RelayMetadata
>
> + @StateObject var log: RelayLog

I'm not sure this will work as a StateObject. When the view disappears,
RelayLog will get deallocated and the writeToDisk callbacks will be
deallocated as well.

Ideally we would create a RelayModel that would replace the
RelayMetadata in RelayMetadatas. Then the RelayModel would contain
RelayMetadata, RelayLog, etc. Composing multiple ObservableObjects into
one is a bit annoying so perhaps we can move some of the publisher stuff
into the RelayModel instead.
Author Public Key
npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s