A new store directly in the context, this way messages are shared and there is no incoherence between the different views (had a bug of "refresh" because of this)
Remove most of concepts of Conversation only using the peerAddress + messages to keep it simple
Might create an issue later if we want to support group but I don't believe Conversation is compatible with groups anyway
Activate stream on all messages from the provider
Created a bunch of new simplified hooks to replace some heavy hooks we had that were doing all in one
useMessages that get the messages from the store
useFetchMessageFetcher that fetches the messages
useSendMessage that sends a message
useConversations that get all the conversations from the store
useFetchConversations that fetches the conversations
Disable the form when submitting
Display messages from the store first and load in the background (changed the loader)
Fix https://github.com/liteflow-labs/chat/issues/13 and many other issue not yet tracked
I re-wrote a good part of the chat with:
Conversation
only using thepeerAddress
+messages
to keep it simpleConversation
is compatible with groups anywayuseMessages
that get the messages from the storeuseFetchMessageFetcher
that fetches the messagesuseSendMessage
that sends a messageuseConversations
that get all the conversations from the storeuseFetchConversations
that fetches the conversations