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 #3662: Malformed trade chat & dispute speech bubbles #3680

Merged

Conversation

stejbac
Copy link
Contributor

@stejbac stejbac commented Nov 25, 2019

Prevent the 'arrow' of a message bubble from being sporadically anchored to the wrong side - appearing on the left instead of the right hand side of the bubble. This is due to the same ListCell object being reused by JavaFX for different bubbles as the user scrolls up and down the chat pane, which requires that the anchors of each arrow be properly cleared between ListCell.updateItem(..) calls.

To this end, move the block of AnchorPane.clearConstraints(..) calls to the beginning of the updateItem(..) method, as the apparent assumption that updateItem(item, empty = true) will always be called to clear the given ListCell before reusing it as a new bubble turns out to be wrong.

Prevent the 'arrow' of a message bubble from being sporadically anchored
to the wrong side - appearing on the left instead of the right hand side
of the bubble. This is due to the same ListCell object being reused by
JavaFX for different bubbles as the user scrolls up and down the chat
pane, which requires that the anchors of each arrow be properly cleared
between ListCell.updateItem(..) calls.

To this end, move the block of AnchorPane.clearConstraints(..) calls to
the beginning of the updateItem(..) method, as the apparent assumption
that 'updateItem(item, empty = true)' will always be called to clear the
given ListCell before reusing it as a new bubble turns out to be wrong.
Copy link
Member

@freimair freimair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utAck

Copy link
Member

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK - Agree that it is safer to do it like that and that it will fix any constraints issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants