Migrating WindowInsets from accompanist to compose...
# compose
a
Migrating WindowInsets from accompanist to compose foundation, It seems we now have to conditionally apply WindowInsets modifiers depending on if the activity is in edge to edge mode ? Should this be mentioned in the migration guide? With accompanist, I could always have the inset applying padding/modifiers in my topappbar/etc. The inset sizes would be all 0 if the activity had not used the WindowCompat.setDecorFitsSystemWindows API. But with foundation, I'm seeing that windowInsets.statusBars, navigationbars, etc always have size so in our activities that are not yet migrated (or where we don't enable it because OS behavior is semi broken on android10), we're getting ugly extra padding.
c
This is likely because the new version seeds the initial values from the root window insets. Definitely worth raising an issue
a
https://issuetracker.google.com/u/1/issues/232516747 btw I haven't figured out how to detect I'm in edge to edge mode, if someone knows what API works to query