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

Huge bottom space and weird behavior for 1.1.11 #26

Closed
aplr opened this issue Oct 19, 2021 · 8 comments
Closed

Huge bottom space and weird behavior for 1.1.11 #26

aplr opened this issue Oct 19, 2021 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@aplr
Copy link

aplr commented Oct 19, 2021

Hi, some issues popped up with your lib. Up until 1.1.10 my app behaved fine, but as soon as I've upgraded ChatLayout to 1.1.11, things got flaky. When entering a chat room, a huge chunk of empty space without any chat message cells is shown. When looking into layout inspector, no cells show up within the collectionView. When scrolling up, some chat message cells appear, but when scrolling back down they start to disappear again. I first thought it is some autolayout issue (which it could still be), but it worked pre 1.1.11, so I thought I want to ask you here if you know what the issue could be.

trim 99C16C45-89F9-4ABF-98F9-6EC81DEFBCE1

Thank you, and it's a really cool library you have here!
Andreas

@ekazaev
Copy link
Owner

ekazaev commented Oct 19, 2021

@aplr Hi, thank you for your issue. So you con confirm that in 1.1.10 everything was fine and is brokein in 1.1.11? Just to double check where to seek for the issue? In version 1.1.11 i optimized a bit the way how I try to find cells that are visible.
Can you please check and confirm for me that everything is fine with 1.1.10 version and I roll my changes back.
It will be also a great help if you can try to modify the Example app to achieve such behaviour? But it is less urgent. I dont face this issues in my apps.

@aplr
Copy link
Author

aplr commented Oct 19, 2021

Yes, I've reverted now to 1.1.10 and everything works fine as before. I will look into it, but at least for the cells themselves they are totally different from the example app. I will dig into it when I find time. I'll also look at your code if I can find the potential code that breaks. But yea modifying the example app would be good in the first place, of course it was clear to me that this issue is specific to me right now as I suspected your example app works perfectly.

@ekazaev
Copy link
Owner

ekazaev commented Oct 19, 2021

@aplr Can you give me a sneak-pick about your cells. What are so unique about them? Like they can be much bigger than the screen? Or something? Ill invest sometime otherwise Ill rolback my changes. There are just more efficient way to search for visible cells that I added for performance. But it seems it doesnt cover all the cases.

@aplr
Copy link
Author

aplr commented Oct 19, 2021

Noo by no means, I'm just not using the cells from your demo app. But overall, they behave exactly like the ones in iMessage. Seems like an interesting topic, I'll also check the code changes you did, seems like it's not too much. Maybe it is also some instability due to autolayout issues in the first place, and the old way of searching for visible cells was more resilient to them?

@ekazaev
Copy link
Owner

ekazaev commented Oct 20, 2021

Could be, but on the gif that you attached it looks like its calculating the content offset correctly - but some bottom cells are considered not visible. Not sure what is the issue. Will keep looking. But if you can either emulate it in the Example app or try to debug the difference of old and current algorithms and what has changed - it will be a great help.

@ekazaev
Copy link
Owner

ekazaev commented Oct 20, 2021

@aplr Do you use sections in your code?

@ekazaev
Copy link
Owner

ekazaev commented Oct 20, 2021

Please check 1.1.12. I think your case should be covered :) break was the issue

@ekazaev
Copy link
Owner

ekazaev commented Oct 20, 2021

@aplr Feel free to reopen issue if its not. But I am certain that it should be as good as 1.1.10 just faster.

@ekazaev ekazaev closed this as completed Oct 20, 2021
@ekazaev ekazaev self-assigned this Oct 20, 2021
@ekazaev ekazaev added the bug Something isn't working label Oct 20, 2021
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

No branches or pull requests

2 participants