react-native-unistyles 2.30.0 → 2.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,7 +34,7 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
|
|
34
34
|
if (intent.action == Intent.ACTION_CONFIGURATION_CHANGED) {
|
35
35
|
Handler(Looper.getMainLooper()).postDelayed({
|
36
36
|
this@UnistylesModule.onConfigChange()
|
37
|
-
},
|
37
|
+
}, 25)
|
38
38
|
}
|
39
39
|
|
40
40
|
val newConfig = context.resources.configuration
|
@@ -67,6 +67,10 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
|
|
67
67
|
}
|
68
68
|
|
69
69
|
private fun onConfigChange() {
|
70
|
+
if (!this.isCxxReady) {
|
71
|
+
return
|
72
|
+
}
|
73
|
+
|
70
74
|
val colorScheme = this.platform.getColorScheme()
|
71
75
|
val contentSizeCategory = this.platform.getContentSizeCategory()
|
72
76
|
|
@@ -77,6 +81,10 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
|
|
77
81
|
}
|
78
82
|
|
79
83
|
private fun onLayoutConfigChange() {
|
84
|
+
if (!this.isCxxReady) {
|
85
|
+
return
|
86
|
+
}
|
87
|
+
|
80
88
|
val screen = this.platform.getScreenDimensions()
|
81
89
|
val insets = this.platform.getInsets()
|
82
90
|
val statusBar = this.platform.getStatusBarDimensions()
|