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

Show/hide conversation items #473

Closed
sssoleileraaa opened this issue Jul 10, 2019 · 2 comments · Fixed by #688
Closed

Show/hide conversation items #473

sssoleileraaa opened this issue Jul 10, 2019 · 2 comments · Fixed by #688
Labels
♻️ Refactoring This PR is a strict refactoring.

Comments

@sssoleileraaa
Copy link
Contributor

Description

Right now we create a conversation when a source is selected and we delete it whenever the source is unselected. If there is a sync and new messages in the conversation, we delete and recreate it.

Instead of deleting the conversation whenever the source is unselected, let's hide the conversation. And instead of recreating the conversation when new messages come in for a source, let's just append new message widgets to the conversation view.

@sssoleileraaa
Copy link
Contributor Author

This is follow-up for #467

@redshiftzero
Copy link
Contributor

Here's a first proposal for the logic here:

  1. get new conversation items
  2. if order has changed for drawn items, redraw everything
  3. else start iterating through each item
  4. if the text has changed, update text on that item without redrawing the entire item
  5. if the status has changed (e.g. from Pending -> Failed), update the style on the item without redrawing the entire bubble (involves adding methods on the relevant widgets to modify state without redrawing)

Note that the part that complicates the issue here is the fact that items may be reordered - since the client will update to reflect the ordering on the server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ Refactoring This PR is a strict refactoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants