-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback for ChatList #79
Feedback for ChatList #79
Conversation
We probably don't need the renewal locking currentUserId anymore since it cannot change now. |
what about when user is switched? |
That's a good question, but when that happens is there not a "sign-out" and "sign-in" event? And is the ChatList component recreated when that happens? |
we are still hooked into AccountChange event, so it is possible ChatList is still active I suppose, under
|
I think we should test it. It would certainly be cleaner if it did do a sign-out and then back in. |
I tested. Here, I switch between the 2 signed in users but we stay on the same page. |
Co-authored-by: Dexter Williams <dexterwilliams04@gmail.com>
|
@@ -143,7 +144,7 @@ const ChatPage: React.FunctionComponent = () => { | |||
</Dialog> | |||
</div> | |||
<div className={styles.side}> | |||
<ChatListWrapper selectedChatId={chatId} onSelected={onChatSelected} onNewChat={onNewChat} /> | |||
{isSignedIn && <ChatListWrapper selectedChatId={chatId} onSelected={onChatSelected} onNewChat={onNewChat} />} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this the intended implementation? The user would somehow need to know to conditionally render this based on isSignedIn. If it was a prop, we can do this conditional render or just short circuit within the component. Plus the user knows they must provide it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a common approach, LGTM
This PR addresses some comments from Gavin on ChatList:
Completed: