ExploreTrendingAnalytics
Nostr Archives
ExploreTrendingAnalytics
Frederik Handberg11d ago
Think I have found the issue. It's most likely the way I use `removeObserver`. I need to pass the observer token to `removeObserver` to make sure the correct observers are actually removed. This means I need an array to keep track of the many tokens from all the different formatting notifications.
💬 1 replies

Replies (1)

Frederik Handberg11d ago
The token strategy did not make much of a difference, but replacing `.onAppear` and `.onDisappear` with `.onReceive` worked. I also decided to use `MergeMany` instead of having one `.onReceive` for each notification (there are many). https://developer.apple.com/documentation/combine/publish…
0000 sats