Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit e69429b

Browse files
cleanup
1 parent a9e84ac commit e69429b

File tree

6 files changed

+24
-25
lines changed

6 files changed

+24
-25
lines changed

demo-ng/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"nativescript-angular": "~8.0.3",
2626
"nativescript-camera": "~4.5.0",
2727
"nativescript-imagepicker": "~6.2.0",
28-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.0.tgz",
28+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.1.tgz",
2929
"nativescript-theme-core": "~1.0.6",
3030
"reflect-metadata": "~0.1.13",
3131
"rxjs": "~6.5.2",

demo-push/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010
},
1111
"dependencies": {
12-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.0.tgz",
12+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.1.tgz",
1313
"nativescript-theme-core": "~1.0.6",
1414
"nativescript-unit-test-runner": "0.7.0",
1515
"tns-core-modules": "~6.0.6"

demo-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
},
1616
"dependencies": {
17-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.0.tgz",
17+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.1.tgz",
1818
"nativescript-theme-core": "~1.0.6",
1919
"nativescript-vue": "~2.4.0",
2020
"tns-core-modules": "~6.0.0"

demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"firebase-functions": "^2.0.5",
13-
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.0.tgz",
13+
"nativescript-plugin-firebase": "file:../publish/package/nativescript-plugin-firebase-9.1.1.tgz",
1414
"nativescript-theme-core": "^1.0.4",
1515
"nativescript-unit-test-runner": "0.7.0",
1616
"tns-core-modules": "~6.0.6"

src/mlkit/mlkit-cameraview.android.ts

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ export abstract class MLKitCameraView extends MLKitCameraViewBase {
8585

8686
// invoke the permission dialog
8787
ActivityCompatClass.requestPermissions(
88-
application.android.foregroundActivity || application.android.startActivity,
89-
[android.Manifest.permission.CAMERA],
90-
CAMERA_PERMISSION_REQUEST_CODE);
88+
application.android.foregroundActivity || application.android.startActivity,
89+
[android.Manifest.permission.CAMERA],
90+
CAMERA_PERMISSION_REQUEST_CODE);
9191
}
9292
} else {
9393
console.log("There's no Camera on this device :(");
@@ -102,9 +102,9 @@ export abstract class MLKitCameraView extends MLKitCameraViewBase {
102102

103103
private hasCamera(): boolean {
104104
return !!utils.ad
105-
.getApplicationContext()
106-
.getPackageManager()
107-
.hasSystemFeature("android.hardware.camera");
105+
.getApplicationContext()
106+
.getPackageManager()
107+
.hasSystemFeature("android.hardware.camera");
108108
}
109109

110110
private initView(nativeView): void {
@@ -154,7 +154,7 @@ export abstract class MLKitCameraView extends MLKitCameraViewBase {
154154
parameters.setPreviewFormat(android.graphics.ImageFormat.NV21);
155155

156156
application.off("orientationChanged");
157-
application.on("orientationChanged", () => { this.setRotation(this.camera, parameters, requestedCameraId ); });
157+
application.on("orientationChanged", () => this.setRotation(this.camera, parameters, requestedCameraId));
158158

159159
this.setRotation(this.camera, parameters, requestedCameraId);
160160
this.fixStretch(previewSize.width, previewSize.height);
@@ -176,12 +176,12 @@ export abstract class MLKitCameraView extends MLKitCameraViewBase {
176176
const onFailureListener = this.createFailureListener();
177177

178178
let metadata =
179-
new com.google.firebase.ml.vision.common.FirebaseVisionImageMetadata.Builder()
180-
.setFormat(com.google.firebase.ml.vision.common.FirebaseVisionImageMetadata.IMAGE_FORMAT_NV21)
181-
.setWidth(previewSize.width)
182-
.setHeight(previewSize.height)
183-
.setRotation(this.rotation)
184-
.build();
179+
new com.google.firebase.ml.vision.common.FirebaseVisionImageMetadata.Builder()
180+
.setFormat(com.google.firebase.ml.vision.common.FirebaseVisionImageMetadata.IMAGE_FORMAT_NV21)
181+
.setWidth(previewSize.width)
182+
.setHeight(previewSize.height)
183+
.setRotation(this.rotation)
184+
.build();
185185

186186
let throttle = 0;
187187
this.camera.setPreviewCallbackWithBuffer(new android.hardware.Camera.PreviewCallback({
@@ -209,15 +209,15 @@ export abstract class MLKitCameraView extends MLKitCameraViewBase {
209209
if (this.detector.processImage) {
210210
this.lastVisionImage = com.google.firebase.ml.vision.common.FirebaseVisionImage.fromByteBuffer(data, metadata);
211211
this.detector
212-
.processImage(this.lastVisionImage)
213-
.addOnSuccessListener(onSuccessListener)
214-
.addOnFailureListener(onFailureListener);
212+
.processImage(this.lastVisionImage)
213+
.addOnSuccessListener(onSuccessListener)
214+
.addOnFailureListener(onFailureListener);
215215
} else if (this.detector.detectInImage) {
216216
this.lastVisionImage = com.google.firebase.ml.vision.common.FirebaseVisionImage.fromByteBuffer(data, metadata);
217217
this.detector
218-
.detectInImage(this.lastVisionImage)
219-
.addOnSuccessListener(onSuccessListener)
220-
.addOnFailureListener(onFailureListener);
218+
.detectInImage(this.lastVisionImage)
219+
.addOnSuccessListener(onSuccessListener)
220+
.addOnFailureListener(onFailureListener);
221221
} else {
222222
this.runDetector(data, previewSize.width, previewSize.height);
223223
}
@@ -414,5 +414,4 @@ export abstract class MLKitCameraView extends MLKitCameraViewBase {
414414
camera.setDisplayOrientation(displayAngle);
415415
parameters.setRotation(angle);
416416
}
417-
418417
}

src/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-plugin-firebase",
3-
"version": "9.1.0",
3+
"version": "9.1.1",
44
"description": "Fire. Base. Firebase!",
55
"main": "firebase",
66
"typings": "index.d.ts",

0 commit comments

Comments
 (0)