@capgo/camera-preview 7.13.5 → 7.13.6

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.
@@ -1935,7 +1935,14 @@ public class CameraPreview: CAPPlugin, CAPBridgedPlugin, CLLocationManagerDelega
1935
1935
  }
1936
1936
  }
1937
1937
 
1938
+ private var lastOrientation: String?
1939
+
1938
1940
  @objc private func handleOrientationChange() {
1941
+ var currentOrientation = self.currentOrientationString()
1942
+ if currentOrientation == "portrait-upside-down" || currentOrientation == lastOrientation {
1943
+ return
1944
+ }
1945
+ lastOrientation = currentOrientation
1939
1946
  DispatchQueue.main.async {
1940
1947
  let result = self.rawSetAspectRatio()
1941
1948
  self.notifyListeners("screenResize", data: result)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/camera-preview",
3
- "version": "7.13.5",
3
+ "version": "7.13.6",
4
4
  "description": "Camera preview",
5
5
  "license": "MIT",
6
6
  "repository": {