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

New messages not getting added to existing conversation #467

Closed
redshiftzero opened this issue Jul 5, 2019 · 5 comments · Fixed by #481
Closed

New messages not getting added to existing conversation #467

redshiftzero opened this issue Jul 5, 2019 · 5 comments · Fixed by #481
Assignees
Labels
bug Something isn't working
Milestone

Comments

@redshiftzero
Copy link
Contributor

STR

  1. Send a message as a source A - stay logged in this source account
  2. Log into client, view source A. See that the message gets downloaded/decrypted
  3. Send a second message as source A
  4. Log into client, click refresh and view source A.

Expected Behavior

The message appears.

Actual Behavior

The message doesn't appear, but viewing the logs it's getting downloaded/decrypted.

@redshiftzero
Copy link
Contributor Author

redshiftzero commented Jul 9, 2019

The diff here resolves this bug but is just a demonstration of the problem as the fix is not the best imho: we should move away from redrawing the conversation view on source update. Right now, the current signals/slots will update all existing message bubbles without needing to redraw the conversation view. The problem is that when a conversation item is added to an existing source and the message bubble wasn't initially created when the conservation view is created, we don't have any slot that will create the corresponding bubble in the source conversation view of interest. I think the best fix here should be to implement that functionality so that we don't need to redraw the entire conversation view anymore.

@sssoleileraaa
Copy link
Contributor

Resolves #463

^ just tested and confirmed

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Jul 9, 2019

The problem is that when a conversation item is added to an existing source and the message bubble wasn't initially created when the conservation view is created, we don't have any slot that will create the corresponding bubble in the source conversation view of interest.

Exactly. I think it's a good idea to use your fix in the meantime, but it doesn't makes sense to delete and redraw the entire conversation each time there is a new message.

To implement this in a more ideal way, I think we would need to stop creating conversation views on the fly whenever a new source is selected and deleting it whenever a source is unselected. Instead we should show and hide widgets accordingly and only create widgets once for each message and reply.

@sssoleileraaa
Copy link
Contributor

Just a note that I don't see a UI flicker from your change in the diff.

@sssoleileraaa
Copy link
Contributor

Update: I see the flicker now. Here are my steps to repro:

  1. Select a source
  2. Send a bunch of messages from a NEW source (5 should be enough)
  3. Click refresh and see a flicker of widgets getting created in the conversation view for the new source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants