nativescript-barcodescanner
Advanced tools
Comparing version 3.3.1 to 3.3.2
@@ -34,3 +34,4 @@ import { BarcodeScannerView as BarcodeScannerBaseView, ScanOptions, ScanResult } from "./barcodescanner-common"; | ||
private isPresentingModally; | ||
private close; | ||
private getViewControllerToPresentFrom; | ||
} |
@@ -152,9 +152,3 @@ "use strict"; | ||
try { | ||
if (_this._lastScanViewController) { | ||
_this._lastScanViewController.dismissViewControllerAnimatedCompletion(true, null); | ||
_this._lastScanViewController = undefined; | ||
} | ||
else { | ||
_this.getViewControllerToPresentFrom().dismissViewControllerAnimatedCompletion(true, null); | ||
} | ||
_this.close(); | ||
_this._removeVolumeObserver(); | ||
@@ -260,2 +254,11 @@ _this._closeCallback && _this._closeCallback(); | ||
}; | ||
BarcodeScanner.prototype.close = function () { | ||
if (this._lastScanViewController) { | ||
this._lastScanViewController.dismissViewControllerAnimatedCompletion(true, null); | ||
this._lastScanViewController = undefined; | ||
} | ||
else { | ||
this.getViewControllerToPresentFrom().dismissViewControllerAnimatedCompletion(true, null); | ||
} | ||
}; | ||
BarcodeScanner.prototype.getViewControllerToPresentFrom = function (presentInRootViewController) { | ||
@@ -388,3 +391,3 @@ var frame = require("tns-core-modules/ui/frame"); | ||
QRCodeReaderDelegateImpl.prototype.readerDidCancel = function (reader) { | ||
this._owner.get().getViewControllerToPresentFrom().dismissViewControllerAnimatedCompletion(true, null); | ||
this._owner.get().close(); | ||
this._callback(); | ||
@@ -418,3 +421,3 @@ }; | ||
validResult = true; | ||
this._owner.get().getViewControllerToPresentFrom().dismissViewControllerAnimatedCompletion(true, null); | ||
this._owner.get().close(); | ||
this._callback(value, barcodeFormat); | ||
@@ -421,0 +424,0 @@ } |
{ | ||
"name": "nativescript-barcodescanner", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "Scan QR/barcodes with your NativeScript app.", | ||
@@ -5,0 +5,0 @@ "main": "barcodescanner", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
811
1690948