react-native-unistyles 2.7.0 → 2.7.1-rc.1

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  [![platform - ios](https://img.shields.io/badge/iOS-000?logo=apple&style=for-the-badge)](https://developer.apple.com/ios/)
11
11
  [![platform - macos](https://img.shields.io/badge/macOS-000?logo=apple&style=for-the-badge)](https://developer.apple.com/macos/)
12
12
  [![platform - appletv](https://img.shields.io/badge/Apple_TV-000?logo=apple&style=for-the-badge)](https://developer.apple.com/tvos/)
13
- [![platform - visionos](https://img.shields.io/badge/vision_os-000?logo=apple&style=for-the-badge)](https://developer.apple.com/visionos/)
13
+ [![platform - visionos](https://img.shields.io/badge/visionos-000?logo=apple&style=for-the-badge)](https://developer.apple.com/visionos/)
14
14
  [![platform - android](https://img.shields.io/badge/Android-44CD11?style=for-the-badge&logo=android&logoColor=white)](https://developer.android.com/)
15
15
  [![platform - androidtv](https://img.shields.io/badge/Android_TV-44CD11?style=for-the-badge&logo=android&logoColor=white)](https://www.android.com/intl/pl_pl/tv/)
16
16
  [![platform - windows](https://img.shields.io/badge/windows-00a2ed?logo=windows&style=for-the-badge)](https://microsoft.github.io/react-native-windows/docs/getting-started)
@@ -244,7 +244,9 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
244
244
  }
245
245
 
246
246
  try {
247
- activity.window.navigationBarColor = if (color == "") platform.defaultNavigationBarColor!! else Color.parseColor(color)
247
+ activity.runOnUiThread {
248
+ activity.window.navigationBarColor = if (color == "") platform.defaultNavigationBarColor!! else Color.parseColor(color)
249
+ }
248
250
  } catch (_: Exception) {
249
251
  Log.d("Unistyles", "Failed to set navigation bar color: $color")
250
252
  }
@@ -258,7 +260,9 @@ class UnistylesModule(reactContext: ReactApplicationContext) : ReactContextBaseJ
258
260
  }
259
261
 
260
262
  try {
261
- activity.window.statusBarColor = if (color == "") platform.defaultStatusBarColor!! else Color.parseColor(color)
263
+ activity.runOnUiThread {
264
+ activity.window.statusBarColor = if (color == "") platform.defaultStatusBarColor!! else Color.parseColor(color)
265
+ }
262
266
  } catch (_: Exception) {
263
267
  Log.d("Unistyles", "Failed to set status bar color: $color")
264
268
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-unistyles",
3
- "version": "2.7.0",
3
+ "version": "2.7.1-rc.1",
4
4
  "description": "Level up your React Native StyleSheet",
5
5
  "scripts": {
6
6
  "test": "jest",