expo-camera 13.4.1 → 13.4.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,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 13.4.2 — 2023-07-04
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Fix crash when onBarCodeScanned or onFacesDetected callback is removed. ([#23223](https://github.com/expo/expo/pull/23223) by [@thespacemanatee](https://github.com/thespacemanatee))
18
+
13
19
  ## 13.4.1 — 2023-06-28
14
20
 
15
21
  ### 🐛 Bug fixes
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '13.4.1'
6
+ version = '13.4.2'
7
7
 
8
8
  buildscript {
9
9
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
@@ -67,7 +67,7 @@ android {
67
67
  minSdkVersion safeExtGet("minSdkVersion", 21)
68
68
  targetSdkVersion safeExtGet("targetSdkVersion", 33)
69
69
  versionCode 32
70
- versionName "13.4.1"
70
+ versionName "13.4.2"
71
71
  }
72
72
 
73
73
  lintOptions {
@@ -238,12 +238,12 @@ class CameraViewModule : Module() {
238
238
  view.cameraView.setUsingCamera2Api(useCamera2Api)
239
239
  }
240
240
 
241
- Prop("barCodeScannerEnabled") { view: ExpoCameraView, barCodeScannerEnabled: Boolean ->
242
- view.setShouldScanBarCodes(barCodeScannerEnabled)
241
+ Prop("barCodeScannerEnabled") { view: ExpoCameraView, barCodeScannerEnabled: Boolean? ->
242
+ view.setShouldScanBarCodes(barCodeScannerEnabled ?: false)
243
243
  }
244
244
 
245
- Prop("faceDetectorEnabled") { view: ExpoCameraView, faceDetectorEnabled: Boolean ->
246
- view.setShouldDetectFaces(faceDetectorEnabled)
245
+ Prop("faceDetectorEnabled") { view: ExpoCameraView, faceDetectorEnabled: Boolean? ->
246
+ view.setShouldDetectFaces(faceDetectorEnabled ?: false)
247
247
  }
248
248
 
249
249
  Prop("faceDetectorSettings") { view: ExpoCameraView, settings: Map<String, Any>? ->
@@ -126,15 +126,15 @@ public final class CameraViewModule: Module {
126
126
  view.updatePictureSize()
127
127
  }
128
128
 
129
- Prop("faceDetectorEnabled") { (view, detectFaces: Bool) in
129
+ Prop("faceDetectorEnabled") { (view, detectFaces: Bool?) in
130
130
  if view.isDetectingFaces != detectFaces {
131
- view.isDetectingFaces = detectFaces
131
+ view.isDetectingFaces = detectFaces ?? false
132
132
  }
133
133
  }
134
134
 
135
- Prop("barCodeScannerEnabled") { (view, scanBarCodes: Bool) in
135
+ Prop("barCodeScannerEnabled") { (view, scanBarCodes: Bool?) in
136
136
  if view.isScanningBarCodes != scanBarCodes {
137
- view.isScanningBarCodes = scanBarCodes
137
+ view.isScanningBarCodes = scanBarCodes ?? false
138
138
  }
139
139
  }
140
140
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-camera",
3
- "version": "13.4.1",
3
+ "version": "13.4.2",
4
4
  "description": "A React component that renders a preview for the device's either front or back camera. Camera's parameters like zoom, auto focus, white balance and flash mode are adjustable. With expo-camera, one can also take photos and record videos that are saved to the app's cache. Morever, the component is also capable of detecting faces and bar codes appearing on the preview.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -43,5 +43,5 @@
43
43
  "peerDependencies": {
44
44
  "expo": "*"
45
45
  },
46
- "gitHead": "4a38f32842594bb0ef39228dacde53042f12a47b"
46
+ "gitHead": "cf90d5c30c2a08a6493ebfa8aa3791aa70666759"
47
47
  }