adrielcafe / voyager

🛸 A pragmatic navigation library for Jetpack Compose
https://voyager.adriel.cafe
MIT License
2.27k stars 109 forks source link

Nesting Navigators prevents WindowInsets from being updated upon device rotation on iOS #366

Open ElliotSknr opened 2 months ago

ElliotSknr commented 2 months ago

I have found that on iOS, window insets are not being updated correctly after the device is rotated, only if you are using nested navigators.

I have linked a sample project that contains the minimal reproducible code. Please see the App.kt file and change the useNestedNavigators value.

I've tested on both 1.1.0-alpha03, where the issue is present. Upon downgrading to 1.0.0 with no other changes, the issue goes away.

Sample Project: https://github.com/ElliotSknr/WindowInsetsDemo

https://github.com/adrielcafe/voyager/assets/16073141/cad5eeba-af1c-498b-aca5-f2bafd2587d6

https://github.com/adrielcafe/voyager/assets/16073141/301f6326-0c11-4090-a037-30091f5e372a

ElliotSknr commented 2 weeks ago

I've updated the sample project which replicates the issue to use 1.1.0-alpha04. Unfortunately the bump to Compose Multiplatform 1.6.1 in this version does not seem to have fixed this particular bug.