good way of getting inbox into the UI #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently the
Adapter.getInbox()
method signature doesn't return anything, so relies on side effects to populate the UI.Probably, we don't want to populate the UI directly from this method. Thinking we will sideload message objects into a message store (or return them, if I can figure out a good way to do it on the nostr side), and poll that store regularly from the UI to render the messages appropriately.
UI side
adapter side
i concur lets create some type of variable that holds the messages
on the nostr side can underbbs store notifications for other kinds of note kinds (not just kind 14's (private messages as defined in nip 17)
maybe notifications for emoji reactions on clients that implement custom emojis like Amethyst
https://github.com/nostr-protocol/nips/blob/master/25.md
Yeah this issue is pretty old, but with the current state of the backend we can start experimenting and reframing it.
Current idea is to have 2 ways to get data from the backend:
Then yeah we'll have a frontend object that should reflect the message threads as closely as possible, and notifications will be part of this.
We're almost there. Seems AdapterElement is building threads but trying to render them before any have been built. Pretty strange.
What we ended up doing was:
data-latest
attribute with the ID of the data that came indata-latest
and fetch it from the repository it will place the data appropriately in its own internal data structures, and if the UI needs to be updated it will do that as wellSupposedly, the callbacks for custom elements are synchronous, so when we make subsequent changes to the same
data-latest
, theconnectedCallback
andattributeChangedCallback
calls in progress and pending are completed before the next one is run. I will test this before marking this issue closed.