Skip to content
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

Fix chat view when leaving current room #871

Merged
merged 5 commits into from
May 9, 2018

Conversation

danxuliu
Copy link
Member

@danxuliu danxuliu commented May 9, 2018

Fixes #857

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When explicitly leaving the current room through the room list view the
chat view was detached. However, as the internal state of the
Application object (which manages the placement of the chat view) was
not updated the chat view was always hidden from that point on until the
page was reloaded.

Moreover, as the chat view was detached only when explicitly leaving the
current room the chat view was not hidden for other users in the room if
it was deleted by a moderator.

As the "leaveCurrentRoom" event is triggered in the room channel when
the current room is left, either explicitly or implicitly, now the
Application object listens to that event and hides the chat view as
needed when it is received.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
In order to check if certain conversation is the active conversation
the element for the active conversation list item with the given name
was found and then it was verified that it was visible; waiting for the
element to be visible using the implicit wait made to find the element
is a valid approach if the element is always visible when it exists in
the DOM. However, during the lapse between removing/deleting the
conversation and getting the updated conversation list from the server
the element may be hidden but exist in the DOM. Due to that it has to be
explicitly waited for the element to be visible.

Signed-off-by: Daniel Calviño Sánchez <[email protected]>
@Ivansss Ivansss merged commit d49060a into master May 9, 2018
@Ivansss Ivansss deleted the fix-chat-view-when-leaving-current-room branch May 9, 2018 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants