Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: handle switching the active account (#2613)
* Update Chat component - Display different messages for different states - Fix typings Signed-off-by: Martin Musale <[email protected]> * Update the GraphNotificationClient - Add reconnect and closing of the connection methods - Add a method to unsubscribe from all the notifications Signed-off-by: Martin Musale <[email protected]> * Update the StatefulGraphChatClient - Add a new status 'no messages' - Perform state updates when the user account is changed - Add methods to handle connection closing or reconnection - Add methods to clear current user messages and update the current user name - Change state update logic when there is no chat ID passed Signed-off-by: Martin Musale <[email protected]> * Update getting the current user values Signed-off-by: Martin Musale <[email protected]> * Update sample to pass chatID and select a default chat Signed-off-by: Martin Musale <[email protected]> * Update packages Signed-off-by: Martin Musale <[email protected]> * Purge the cached subscriptions from the session Signed-off-by: Martin Musale <[email protected]> * Add ChatMessageBar template state messages Signed-off-by: Martin Musale <[email protected]> * Add event states that are changing in the provider Signed-off-by: Martin Musale <[email protected]> * Remove default chat selection from sampl Signed-off-by: Martin Musale <[email protected]> * Set the chat ID if only it has been changed Signed-off-by: Martin Musale <[email protected]> * Update the stateful client to emit errors Signed-off-by: Martin Musale <[email protected]> * Use property over the backing field Signed-off-by: Martin Musale <[email protected]> * Close and re-open signalR hub connection when acct changes This is way simpler to enable removing all the subscriptions for a given chat. The alternative that was using the connection.off method required precise handlers that were the same as the ones passed during creation of the subscriptions. Signed-off-by: Martin Musale <[email protected]> * Log error when loadChatData fails Signed-off-by: Martin Musale <[email protected]> * Remove guard checking chatId twice Signed-off-by: Musale Martin <[email protected]> * Remove CTA to select a chat to display messages Signed-off-by: Musale Martin <[email protected]> * Add additional information in the error block Signed-off-by: Martin Musale <[email protected]> --------- Signed-off-by: Martin Musale <[email protected]> Signed-off-by: Musale Martin <[email protected]>
- Loading branch information