From 2c8e9e8f3dc30315eb828f1daf431a3604d7aa5d Mon Sep 17 00:00:00 2001 From: Janic Duplessis Date: Tue, 9 Jul 2024 01:43:33 -0400 Subject: [PATCH] fix: include captionBar in insets --- .../main/java/com/th3rdwave/safeareacontext/SafeAreaUtils.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaUtils.kt b/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaUtils.kt index 0203be6e..1fef8dcd 100644 --- a/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaUtils.kt +++ b/android/src/main/java/com/th3rdwave/safeareacontext/SafeAreaUtils.kt @@ -15,7 +15,8 @@ private fun getRootWindowInsetsCompatR(rootView: View): EdgeInsets? { rootView.rootWindowInsets?.getInsets( WindowInsets.Type.statusBars() or WindowInsets.Type.displayCutout() or - WindowInsets.Type.navigationBars()) + WindowInsets.Type.navigationBars() or + WindowInsets.Type.captionBar()) ?: return null return EdgeInsets( top = insets.top.toFloat(),