Closed mlykotom closed 3 years ago
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?
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?
My bad, I’ll release a new version tomorrow!
Hurray, thank you!
In method
applyToView
and checking for custom listener, there's probably a bug with checking if insets should be consumed. https://github.com/chrisbanes/insetter/blob/2724d4692ef78d81241579314c2a74ff9b492671/library/src/main/java/dev/chrisbanes/insetter/Insetter.kt#L373The 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.