Damus
Frederik Handberg profile picture
Frederik Handberg
@frederikhandberg
I'm getting a leak somewhere in my formatting notifications (I use `NotificationCenter`).

This is causing problems if I have two note documents open in the same window.

For example, if I change the block type from text to a heading in one of the notes, then save and go to the other note, it will have completely overridden the data.
2
Frederik Handberg · 5d
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.