expo-system-ui 2.9.0 → 2.9.2

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.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 2.9.2 — 2023-12-19
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 2.9.1 — 2023-12-15
18
+
19
+ ### 🐛 Bug fixes
20
+
21
+ - Fixed custom `backgroundColor` is broken on iOS. ([#25946](https://github.com/expo/expo/pull/25946) by [@kudo](https://github.com/kudo))
22
+
13
23
  ## 2.9.0 — 2023-12-12
14
24
 
15
25
  _This version does not introduce any user-facing changes._
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '2.9.0'
6
+ version = '2.9.2'
7
7
 
8
8
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
9
9
  if (expoModulesCorePlugin.exists()) {
@@ -94,7 +94,7 @@ android {
94
94
  namespace "expo.modules.systemui"
95
95
  defaultConfig {
96
96
  versionCode 1
97
- versionName '2.9.0'
97
+ versionName '2.9.2'
98
98
  }
99
99
  }
100
100
 
@@ -12,18 +12,21 @@ object SystemUI {
12
12
  successCallback: () -> Unit,
13
13
  failureCallback: (reason: String) -> Unit
14
14
  ) {
15
-
16
15
  val mode = if (style == null) {
17
16
  AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
18
- } else when (style) {
19
- "automatic" -> {
20
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
21
- AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY
22
- } else AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
17
+ } else {
18
+ when (style) {
19
+ "automatic" -> {
20
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
21
+ AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY
22
+ } else {
23
+ AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM
24
+ }
25
+ }
26
+ "dark" -> AppCompatDelegate.MODE_NIGHT_YES
27
+ "", "light" -> AppCompatDelegate.MODE_NIGHT_NO
28
+ else -> return failureCallback("Invalid user interface style: \"$style\"")
23
29
  }
24
- "dark" -> AppCompatDelegate.MODE_NIGHT_YES
25
- "", "light" -> AppCompatDelegate.MODE_NIGHT_NO
26
- else -> return failureCallback("Invalid user interface style: \"$style\"")
27
30
  }
28
31
  AppCompatDelegate.setDefaultNightMode(mode)
29
32
  successCallback()
@@ -8,14 +8,14 @@ public class ExpoSystemUIModule: Module {
8
8
  Name("ExpoSystemUI")
9
9
 
10
10
  OnCreate {
11
- // TODO: Maybe read from the app manifest instead of from Info.plist.
12
- // Set / reset the initial color on reload and app start.
13
11
  let color = UserDefaults.standard.integer(forKey: Self.colorKey)
14
-
15
12
  if color > 0 {
16
13
  Self.setBackgroundColorAsync(color: color)
17
14
  } else {
18
- Self.setBackgroundColorAsync(color: nil)
15
+ // TODO: Maybe read from the app manifest instead of from Info.plist.
16
+ // Set / reset the initial color on reload and app start.
17
+ let colorFromPlugin = Bundle.main.object(forInfoDictionaryKey: "RCTRootViewBackgroundColor") as? Int
18
+ Self.setBackgroundColorAsync(color: colorFromPlugin)
19
19
  }
20
20
  }
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-system-ui",
3
- "version": "2.9.0",
3
+ "version": "2.9.2",
4
4
  "description": "Interact with system UI elements",
5
5
  "main": "build/SystemUI.js",
6
6
  "types": "build/SystemUI.d.ts",
@@ -44,5 +44,5 @@
44
44
  "peerDependencies": {
45
45
  "expo": "*"
46
46
  },
47
- "gitHead": "6aca7ce098ddc667776a3d7cf612adbb985e264a"
47
+ "gitHead": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431"
48
48
  }