diff --git a/resources/android/NativeUIChromeInit.kt b/resources/android/NativeUIChromeInit.kt index ed73e86..0daa042 100644 --- a/resources/android/NativeUIChromeInit.kt +++ b/resources/android/NativeUIChromeInit.kt @@ -22,7 +22,11 @@ import com.nativephp.plugins.native_ui.ui.nuiThemeDefaultTypography * application context for asset-backed font loading. */ fun registerNativeUIChrome(context: Context) { - NativeRootHostRegistry.register("native-ui.drawer", consumes = "native_drawer") { root, content -> + NativeRootHostRegistry.register( + "native-ui.drawer", + consumes = "native_drawer", + reservesNavigationBarSlot = true, + ) { root, content -> val drawerNode = root.children.firstOrNull { it.type == "native_drawer" } NativeLayoutDrawerHost(drawerNode = drawerNode, content = content) } diff --git a/tests/NativeUIChromeInitTest.php b/tests/NativeUIChromeInitTest.php new file mode 100644 index 0000000..2634803 --- /dev/null +++ b/tests/NativeUIChromeInitTest.php @@ -0,0 +1,15 @@ +[^)]*)\)/s', + $source, + $registration, + ); + + expect($matched)->toBe(1) + ->and($registration['arguments']) + ->toMatch('/consumes\s*=\s*"native_drawer"/') + ->toMatch('/reservesNavigationBarSlot\s*=\s*true/'); +});