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

Cells are not positioned right/left without chatLayout.invalidateLayout() #32

Closed
bezig01 opened this issue Jul 4, 2022 · 2 comments
Closed
Assignees
Labels
help wanted Extra attention is needed

Comments

@bezig01
Copy link

bezig01 commented Jul 4, 2022

@ekazaev thanks for such amazing project, I do not regret taking the time to study it.

I tried to solve the question why it happens that the cells after scrolling do not take into account their right / left position, this seems to be solved by periodically calling chatLayout.invalidateLayout() by timer, but this is not a solution.

As a basis, I took a simplified version from the sample application. I have attached a video showing this problem.
https://youtube.com/shorts/xfzyfh8v2Ps?feature=share

Seems to be related to this piece of code, but your help is needed. Thanks

cellView.leadingView?.isHiddenSafe = !alignment.isIncoming
cellView.leadingView?.alpha = alignment.isIncoming ? 1 : 0
cellView.trailingView?.isHiddenSafe = alignment.isIncoming
cellView.trailingView?.alpha = alignment.isIncoming ? 0 : 1

@ekazaev
Copy link
Owner

ekazaev commented Jul 5, 2022

@bezig01 Thank you.
This is really strange behaviour tbh. But it doesnt happen in the Example app afaik. Neither I seen in in other projects I use this library. So to be able to help you I have to look into the code. Can you please provide the sample code that demonstrates such behaviour?

@ekazaev ekazaev self-assigned this Jul 5, 2022
@ekazaev ekazaev added the help wanted Extra attention is needed label Jul 5, 2022
@ekazaev
Copy link
Owner

ekazaev commented Jul 14, 2022

Closed due to inactivity

@ekazaev ekazaev closed this as completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants