From 4d5e9eeee81fc572933ca0a44352bf9f3cc16d48 Mon Sep 17 00:00:00 2001 From: Jacek Pudysz Date: Sat, 22 Jun 2024 07:29:20 +0200 Subject: [PATCH] feat: insets android add support for headless mode --- android/src/main/java/com/unistyles/UnistylesModule.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/unistyles/UnistylesModule.kt b/android/src/main/java/com/unistyles/UnistylesModule.kt index 28092b62..118f160a 100644 --- a/android/src/main/java/com/unistyles/UnistylesModule.kt +++ b/android/src/main/java/com/unistyles/UnistylesModule.kt @@ -96,8 +96,6 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ System.loadLibrary("unistyles") this.platform = Platform(reactApplicationContext) - this.enableEdgeToEdge() - this.reactApplicationContext.javaScriptContextHolder?.let { contextHolder -> this.reactApplicationContext.catalystInstance.jsCallInvokerHolder?.let { callInvokerHolder: CallInvokerHolder -> this.nativeInstall(contextHolder.get(), callInvokerHolder) @@ -138,6 +136,8 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ fun removeListeners(count: Double) = Unit override fun onHostResume() { + this.enableEdgeToEdge() + if (isCxxReady) { this.onConfigChange() }