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

Bug: Custom listener + consuming insets #102

Closed
mlykotom opened this issue Mar 16, 2021 · 4 comments · Fixed by #103
Closed

Bug: Custom listener + consuming insets #102

mlykotom opened this issue Mar 16, 2021 · 4 comments · Fixed by #103

Comments

@mlykotom
Copy link

In method applyToView and checking for custom listener, there's probably a bug with checking if insets should be consumed.

return@setOnApplyWindowInsetsListener if (consume != CONSUME_NONE) insets

The problem is in the if condition - it should be reverted and therefore if(consume == CONSUME_NONE) insets else WindowInsetsCompat.CONSUMED because when none consumed, then we should return the initial insets, right?

This breaks insetter when custom listener is applied somewhere in the view hierarchy.

@dimsuz
Copy link

dimsuz commented Apr 29, 2021

Aha! So that's why it broke for me after upgrade. I heavily rely on custom listener in my setup.

Any chance this will be released soon?

@dimsuz
Copy link

dimsuz commented May 24, 2021

Friendly ping @chrisbanes. Currently have to use an obsolete library version and also getting a lot of insets-related @Deprecated warnings. I can't easily work around this bug (or can I?).

Do you plan on releasing a new minor version in the near future?

@chrisbanes
Copy link
Owner

My bad, I’ll release a new version tomorrow!

@dimsuz
Copy link

dimsuz commented May 24, 2021

Hurray, thank you!

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 a pull request may close this issue.

3 participants