From 7151db47b88343fdb5a0c9b6c32916ca101966cb Mon Sep 17 00:00:00 2001 From: Robin Genz Date: Thu, 29 Aug 2024 22:30:35 +0200 Subject: [PATCH] style: format --- .../media/photoviewer/PhotoViewer.java | 42 ++++---- .../media/photoviewer/PhotoViewerPlugin.java | 85 ++++++++-------- ios/Plugin/Extensions/UIViewController.swift | 1 - .../OnePhoto/OneImageViewController.swift | 5 +- .../ImageScrollViewController.swift | 8 +- ios/Plugin/PhotoSlider/ImagesToVideo.swift | 6 +- ios/Plugin/PhotoViewer.swift | 10 +- ios/Plugin/PhotoViewerPlugin.swift | 40 ++++---- ios/Plugin/Utils/UtlisImage.swift | 14 +-- ios/PluginTests/PhotoViewerPluginTests.swift | 9 -- src/definitions.ts | 2 +- src/web.ts | 98 ++++++++++--------- 12 files changed, 151 insertions(+), 169 deletions(-) diff --git a/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewer.java b/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewer.java index d381c15..197cf57 100644 --- a/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewer.java +++ b/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewer.java @@ -55,8 +55,8 @@ private void createMainFragment(ArrayList imageList, JSObject options) th FrameLayout frameLayoutView = new FrameLayout(context); frameLayoutView.setId(frameLayoutViewId); FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( - FrameLayout.LayoutParams.MATCH_PARENT, - FrameLayout.LayoutParams.MATCH_PARENT + FrameLayout.LayoutParams.MATCH_PARENT, + FrameLayout.LayoutParams.MATCH_PARENT ); // Apply the Layout Parameters to frameLayout frameLayoutView.setLayoutParams(lp); @@ -67,11 +67,11 @@ private void createMainFragment(ArrayList imageList, JSObject options) th mainFragment.setOptions(options); bridge - .getActivity() - .getSupportFragmentManager() - .beginTransaction() - .replace(frameLayoutViewId, mainFragment, "mainfragment") - .commit(); + .getActivity() + .getSupportFragmentManager() + .beginTransaction() + .replace(frameLayoutViewId, mainFragment, "mainfragment") + .commit(); } catch (Exception e) { throw new Exception(e.getMessage()); } @@ -83,8 +83,8 @@ private void createImageFragment(ArrayList imageList, Integer startFrom, FrameLayout frameLayoutView = new FrameLayout(context); frameLayoutView.setId(frameLayoutViewId); FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( - FrameLayout.LayoutParams.MATCH_PARENT, - FrameLayout.LayoutParams.MATCH_PARENT + FrameLayout.LayoutParams.MATCH_PARENT, + FrameLayout.LayoutParams.MATCH_PARENT ); // Apply the Layout Parameters to frameLayout frameLayoutView.setLayoutParams(lp); @@ -96,11 +96,11 @@ private void createImageFragment(ArrayList imageList, Integer startFrom, imageFragment.setStartFrom(startFrom); bridge - .getActivity() - .getSupportFragmentManager() - .beginTransaction() - .replace(frameLayoutViewId, imageFragment, "imagefragment") - .commit(); + .getActivity() + .getSupportFragmentManager() + .beginTransaction() + .replace(frameLayoutViewId, imageFragment, "imagefragment") + .commit(); } catch (Exception e) { throw new Exception(e.getMessage()); } @@ -112,8 +112,8 @@ private void createSliderFragment(ArrayList imageList, Integer startFrom, FrameLayout frameLayoutView = new FrameLayout(context); frameLayoutView.setId(frameLayoutViewId); FrameLayout.LayoutParams lp = new FrameLayout.LayoutParams( - FrameLayout.LayoutParams.MATCH_PARENT, - FrameLayout.LayoutParams.MATCH_PARENT + FrameLayout.LayoutParams.MATCH_PARENT, + FrameLayout.LayoutParams.MATCH_PARENT ); // Apply the Layout Parameters to frameLayout frameLayoutView.setLayoutParams(lp); @@ -127,11 +127,11 @@ private void createSliderFragment(ArrayList imageList, Integer startFrom, galleryFragment.setStartFrom(startFrom); bridge - .getActivity() - .getSupportFragmentManager() - .beginTransaction() - .replace(frameLayoutViewId, galleryFragment, "gallery") - .commit(); + .getActivity() + .getSupportFragmentManager() + .beginTransaction() + .replace(frameLayoutViewId, galleryFragment, "gallery") + .commit(); } catch (Exception e) { throw new Exception(e.getMessage()); } diff --git a/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewerPlugin.java b/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewerPlugin.java index 893b443..cf65f6d 100644 --- a/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewerPlugin.java +++ b/android/src/main/java/com/getcapacitor/community/media/photoviewer/PhotoViewerPlugin.java @@ -18,14 +18,11 @@ import org.json.JSONObject; @CapacitorPlugin( - name = "PhotoViewer", - permissions = { - @Permission(alias = PhotoViewerPlugin.MEDIAIMAGES, - strings = { Manifest.permission.READ_MEDIA_IMAGES }), - - @Permission(alias = PhotoViewerPlugin.READ_EXTERNAL_STORAGE, - strings = { Manifest.permission.READ_EXTERNAL_STORAGE }) - } + name = "PhotoViewer", + permissions = { + @Permission(alias = PhotoViewerPlugin.MEDIAIMAGES, strings = { Manifest.permission.READ_MEDIA_IMAGES }), + @Permission(alias = PhotoViewerPlugin.READ_EXTERNAL_STORAGE, strings = { Manifest.permission.READ_EXTERNAL_STORAGE }) + } ) public class PhotoViewerPlugin extends Plugin { @@ -54,7 +51,7 @@ private void imagesPermissionsCallback(PluginCall call) { } else { call.reject(PERMISSION_DENIED_ERROR); } - } else if (Build.VERSION.SDK_INT >= 29 && Build.VERSION.SDK_INT < 33) { + } else if (Build.VERSION.SDK_INT >= 29 && Build.VERSION.SDK_INT < 33) { if (getPermissionState(READ_EXTERNAL_STORAGE) == PermissionState.GRANTED) { isPermissions = true; show(call); @@ -70,7 +67,6 @@ private boolean isImagesPermissions() { return false; } } else if (Build.VERSION.SDK_INT >= 29 && Build.VERSION.SDK_INT < 33) { - if (getPermissionState(READ_EXTERNAL_STORAGE) != PermissionState.GRANTED) { return false; } @@ -146,24 +142,24 @@ public void show(PluginCall call) { AddObserversToNotificationCenter(); bridge - .getActivity() - .runOnUiThread( - () -> { - try { - if (images.length() <= 1 && (finalMode.equals("gallery") || finalMode.equals("slider"))) { - String msg = "Show : imageList must be greater that one "; - msg += "for Mode " + finalMode; - rHandler.retResult(call, false, msg); - return; - } - implementation.show(images, finalMode, finalStartFrom, finalOptions); - rHandler.retResult(call, true, null); - return; - } catch (Exception e) { - rHandler.retResult(call, false, e.getMessage()); - } + .getActivity() + .runOnUiThread( + () -> { + try { + if (images.length() <= 1 && (finalMode.equals("gallery") || finalMode.equals("slider"))) { + String msg = "Show : imageList must be greater that one "; + msg += "for Mode " + finalMode; + rHandler.retResult(call, false, msg); + return; } - ); + implementation.show(images, finalMode, finalStartFrom, finalOptions); + rHandler.retResult(call, true, null); + return; + } catch (Exception e) { + rHandler.retResult(call, false, e.getMessage()); + } + } + ); } catch (Exception e) { String msg = "Show: " + e.getMessage(); rHandler.retResult(call, false, msg); @@ -171,6 +167,7 @@ public void show(PluginCall call) { } } } + @PluginMethod public void saveImageFromHttpToInternal(PluginCall call) { call.unimplemented("Not implemented on Android."); @@ -178,26 +175,26 @@ public void saveImageFromHttpToInternal(PluginCall call) { @PluginMethod public void getInternalImagePaths(PluginCall call) { - call.unimplemented("Not implemented on Android."); + call.unimplemented("Not implemented on Android."); } private void AddObserversToNotificationCenter() { NotificationCenter - .defaultCenter() - .addMethodForNotification( - "photoviewerExit", - new MyRunnable() { - @Override - public void run() { - JSObject data = new JSObject(); - data.put("result", this.getInfo().get("result")); - data.put("imageIndex", this.getInfo().get("imageIndex")); - data.put("message", this.getInfo().get("message")); - NotificationCenter.defaultCenter().removeAllNotifications(); - notifyListeners("jeepCapPhotoViewerExit", data); - return; - } - } - ); + .defaultCenter() + .addMethodForNotification( + "photoviewerExit", + new MyRunnable() { + @Override + public void run() { + JSObject data = new JSObject(); + data.put("result", this.getInfo().get("result")); + data.put("imageIndex", this.getInfo().get("imageIndex")); + data.put("message", this.getInfo().get("message")); + NotificationCenter.defaultCenter().removeAllNotifications(); + notifyListeners("jeepCapPhotoViewerExit", data); + return; + } + } + ); } } diff --git a/ios/Plugin/Extensions/UIViewController.swift b/ios/Plugin/Extensions/UIViewController.swift index f8f1495..d79eae8 100644 --- a/ios/Plugin/Extensions/UIViewController.swift +++ b/ios/Plugin/Extensions/UIViewController.swift @@ -39,7 +39,6 @@ extension UIViewController { transition.subtype = CATransitionSubtype.fromRight } - self.view.window!.layer.add(transition, forKey: nil) self.dismiss(animated: false, completion: nil) } diff --git a/ios/Plugin/OnePhoto/OneImageViewController.swift b/ios/Plugin/OnePhoto/OneImageViewController.swift index 5559a2e..4facda7 100644 --- a/ios/Plugin/OnePhoto/OneImageViewController.swift +++ b/ios/Plugin/OnePhoto/OneImageViewController.swift @@ -23,7 +23,6 @@ class OneImageViewController: UIViewController, UIScrollViewDelegate { private var _colorRange: [String] = ["white", "ivory", "lightgrey"] private var _btColor: UIColor = UIColor.white - // MARK: - Set-up url var url: String { @@ -96,7 +95,7 @@ class OneImageViewController: UIViewController, UIScrollViewDelegate { navigationBar.isTranslucent = true navigationBar.setBackgroundImage(UIImage(), for: .default) navigationBar.shadowImage = UIImage() - return navigationBar + return navigationBar }() lazy var mClose: UIBarButtonItem = { let bClose = UIBarButtonItem() @@ -221,7 +220,7 @@ class OneImageViewController: UIViewController, UIScrollViewDelegate { NotificationCenter.default.post(name: .photoviewerExit, object: nil, userInfo: vId) -// self.dismissWithTransition() + // self.dismissWithTransition() // self.dismiss(animated: true, completion: nil) if swipe.direction == .up { // Slide-up gesture diff --git a/ios/Plugin/PhotoSlider/ImageScrollViewController.swift b/ios/Plugin/PhotoSlider/ImageScrollViewController.swift index 3b0b8de..22c6d38 100644 --- a/ios/Plugin/PhotoSlider/ImageScrollViewController.swift +++ b/ios/Plugin/PhotoSlider/ImageScrollViewController.swift @@ -114,12 +114,6 @@ class ImageScrollViewController: UIViewController { } - // MARK: - viewDidLoad - - override func viewDidLoad() { - super.viewDidLoad() - } - // MARK: - viewWillAppear override func viewWillAppear(_ animated: Bool) { @@ -136,7 +130,7 @@ class ImageScrollViewController: UIViewController { mScrollView.addSubview(mImageView) if url.prefix(4) == "http" || url.contains("base64") { mImageView.sd_setImage(with: URL(string: url), - placeholderImage: nil) + placeholderImage: nil) } if url.prefix(38) == "file:///var/mobile/Media/DCIM/100APPLE" || diff --git a/ios/Plugin/PhotoSlider/ImagesToVideo.swift b/ios/Plugin/PhotoSlider/ImagesToVideo.swift index 2f45ca2..3219a5c 100644 --- a/ios/Plugin/PhotoSlider/ImagesToVideo.swift +++ b/ios/Plugin/PhotoSlider/ImagesToVideo.swift @@ -199,7 +199,7 @@ class ImagesToVideo { let mediaQueue = DispatchQueue(label: "mediaInputQueue") videoWriterInput .requestMediaDataWhenReady(on: mediaQueue, - using: { () -> Void in + using: { () in let fps: Int32 = 1 let framePerSecond: Int64 = Int64(imagesPerSecond) let frameDuration = @@ -253,7 +253,7 @@ class ImagesToVideo { let verticalRatio = CGFloat(movieSize.height) / nextPhoto.size.height - //let aspectRatio = max(horizontalRatio, + // let aspectRatio = max(horizontalRatio, // verticalRatio) // ScaleAspectFill // ScaleAspectFit @@ -295,7 +295,7 @@ class ImagesToVideo { } } videoWriterInput.markAsFinished() - videoWriter.finishWriting { [self] () -> Void in + videoWriter.finishWriting { [self] () in if videoWriter.status == .completed { self._asset = AVAsset(url: videoURL as URL) diff --git a/ios/Plugin/PhotoViewer.swift b/ios/Plugin/PhotoViewer.swift index 301991f..56a2c96 100644 --- a/ios/Plugin/PhotoViewer.swift +++ b/ios/Plugin/PhotoViewer.swift @@ -87,7 +87,7 @@ enum PhotoViewerError: Error { // get image location from the config guard let imageLocation = config.iosImageLocation else { let message = "You must have 'iosImageLocation' defined in " + - "the capacitor.config.ts file" + "the capacitor.config.ts file" throw PhotoViewerError.failed(message: message) } guard let imageURL = URL(string: url) else { @@ -96,15 +96,15 @@ enum PhotoViewerError: Error { } UtilsImage.downloadAndSaveImage(imageURL: imageURL, - imageName: fileName, - imageLocation: imageLocation) { result in + imageName: fileName, + imageLocation: imageLocation) { result in switch result { case .success(let imagePath): // convert the filepath into a Web View-friendly path. if let range = imagePath.path.range(of: "/Containers/", options: .backwards) { let extractedPath = imagePath.path[range.upperBound...] let resultPath = "capacitor://localhost/_capacitor_file_" + - "/var/mobile/Containers/" + String(extractedPath) + "/var/mobile/Containers/" + String(extractedPath) call.resolve(["webPath": resultPath]) } else { call.resolve(["message": "cannot create the Web View-friendly path"]) @@ -120,7 +120,7 @@ enum PhotoViewerError: Error { // get image location from the config guard let imageLocation = config.iosImageLocation else { let message = "You must have 'iosImageLocation' defined in " + - "the capacitor.config.ts file" + "the capacitor.config.ts file" throw PhotoViewerError.failed(message: message) } do { diff --git a/ios/Plugin/PhotoViewerPlugin.swift b/ios/Plugin/PhotoViewerPlugin.swift index b85848f..abcfaa7 100644 --- a/ios/Plugin/PhotoViewerPlugin.swift +++ b/ios/Plugin/PhotoViewerPlugin.swift @@ -81,40 +81,40 @@ public class PhotoViewerPlugin: CAPPlugin { return } if mode == "gallery" { - guard ((self?.implementation?.show(imageList, mode: mode, - startFrom: startFrom, - options: options)) != nil), + guard (self?.implementation?.show(imageList, mode: mode, + startFrom: startFrom, + options: options)) != nil, let collectionController = self?.implementation? - .collectionController else { + .collectionController else { call.reject("Show : Unable to show the CollectionViewController") return } collectionController.modalPresentationStyle = .fullScreen self?.bridge?.viewController?.present(collectionController, animated: true, completion: { - call.resolve(["result": true]) - }) + call.resolve(["result": true]) + }) } else if mode == "one" { - guard ((self?.implementation?.show(imageList, mode: mode, - startFrom: startFrom, - options: options)) != nil), + guard (self?.implementation?.show(imageList, mode: mode, + startFrom: startFrom, + options: options)) != nil, let oneImageController = self?.implementation? - .oneImageController else { + .oneImageController else { call.reject("Show : Unable to show the OneImageViewController") return } oneImageController.modalPresentationStyle = .fullScreen self?.bridge?.viewController?.present(oneImageController, animated: true, completion: { - call.resolve(["result": true]) - }) + call.resolve(["result": true]) + }) } else if mode == "slider" { - guard ((self?.implementation?.show(imageList, mode: mode, - startFrom: startFrom, - options: options)) != nil), + guard (self?.implementation?.show(imageList, mode: mode, + startFrom: startFrom, + options: options)) != nil, let sliderController = self?.implementation? - .sliderController else { + .sliderController else { call.reject("Show : Unable to show the SliderViewController") return } @@ -171,22 +171,22 @@ public class PhotoViewerPlugin: CAPPlugin { @objc func getInternalImagePaths(_ call: CAPPluginCall) { do { if let pathList: [String] = try self.implementation? - .getInternalImagePaths() { + .getInternalImagePaths() { call.resolve(["pathList": pathList]) return } else { call.reject("GetInternalImagePaths : no image path list") return } - } catch PhotoViewerError.failed(let message) { + } catch PhotoViewerError.failed(let message) { call.reject("GetInternalImagePaths : \(message)") return - } catch let error { + } catch let error { let msg = "GetInternalImagePaths : " + "\(error.localizedDescription)" call.reject("\(msg)") return - } + } } @objc func addObserversToNotificationCenter() { diff --git a/ios/Plugin/Utils/UtlisImage.swift b/ios/Plugin/Utils/UtlisImage.swift index a810592..08fbd5f 100644 --- a/ios/Plugin/Utils/UtlisImage.swift +++ b/ios/Plugin/Utils/UtlisImage.swift @@ -28,7 +28,7 @@ class UtilsImage { class func directoryURL(for imageLocation: String) throws -> URL? { let folders = splitImageLocation(for: imageLocation) - switch folders[0]{ + switch folders[0] { case "Library": if let libraryDirectory = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask).first { let directory = libraryDirectory.appendingPathComponent(folders[1]) @@ -76,7 +76,7 @@ class UtilsImage { options: .backwards) { let extractedPath = fileURL.path[range.upperBound...] let resultPath = "capacitor://localhost/_capacitor_file_" + - "/var/mobile/Containers/" + String(extractedPath) + "/var/mobile/Containers/" + String(extractedPath) listPath.append(resultPath) } else { @@ -87,17 +87,17 @@ class UtilsImage { return listPath } catch { let msg = "\(error)" - throw UtilsImageError.listOfImagePathFailed(message:msg) + throw UtilsImageError.listOfImagePathFailed(message: msg) } } class func downloadAndSaveImage(imageURL: URL, imageName: String, imageLocation: String, completion: @escaping (Result) - -> Void) { + -> Void) { let urlSession = URLSession.shared - let task = urlSession.dataTask(with: imageURL) { (data, response, error) in + let task = urlSession.dataTask(with: imageURL) { (data, _, error) in if let error = error { completion(.failure(error)) return @@ -113,14 +113,14 @@ class UtilsImage { guard let imageDirectory = try directoryURL(for: imageLocation) else { completion(.failure(NSError(domain: "InvalidImageDirectory", code: 0, userInfo: nil))) - return + return } // Create the "Images" directory if it doesn't exist try FileManager.default.createDirectory(at: imageDirectory, withIntermediateDirectories: true, attributes: nil) // Combine the directory and filename to create the full path let imagePath = imageDirectory - .appendingPathComponent(imageName + ".jpeg") + .appendingPathComponent(imageName + ".jpeg") // Save the image to the Library/Images folder diff --git a/ios/PluginTests/PhotoViewerPluginTests.swift b/ios/PluginTests/PhotoViewerPluginTests.swift index b8b5abc..e911884 100644 --- a/ios/PluginTests/PhotoViewerPluginTests.swift +++ b/ios/PluginTests/PhotoViewerPluginTests.swift @@ -2,15 +2,6 @@ import XCTest @testable import Plugin class PhotoViewerTests: XCTestCase { - override func setUp() { - super.setUp() - // Put setup code here. This method is called before the invocation of each test method in the class. - } - - override func tearDown() { - // Put teardown code here. This method is called after the invocation of each test method in the class. - super.tearDown() - } func testEcho() { // This is an example of a functional test case for a plugin. diff --git a/src/definitions.ts b/src/definitions.ts index 951912b..cc980f7 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -174,4 +174,4 @@ export interface capPaths { * image path list */ pathList: string[]; -} \ No newline at end of file +} diff --git a/src/web.ts b/src/web.ts index f44f410..8948992 100644 --- a/src/web.ts +++ b/src/web.ts @@ -36,69 +36,71 @@ export class PhotoViewerWeb extends WebPlugin implements PhotoViewerPlugin { return options; } async show(options: capShowOptions): Promise { -// return new Promise( (resolve, reject) => { - jeepPhotoviewer(window); - if (Object.keys(options).includes('images')) { - this._imageList = options.images; - } - if (Object.keys(options).includes('options')) { - this._options = options.options ?? ({} as ViewerOptions); - } - if (Object.keys(options).includes('mode')) { - const mMode = options.mode; - if (this._modeList.includes(mMode as string)) { - this._mode = mMode ?? 'one'; - } - } - if (Object.keys(options).includes('startFrom')) { - const mStartFrom = options.startFrom; - this._startFrom = mStartFrom ?? 0; - } - this._photoViewer = document.createElement('jeep-photoviewer'); - this._photoViewer.imageList = this._imageList; - this._photoViewer.mode = this._mode; - if (this._mode === 'one' || this._mode === 'slider') { - this._photoViewer.startFrom = this._startFrom; + // return new Promise( (resolve, reject) => { + jeepPhotoviewer(window); + if (Object.keys(options).includes('images')) { + this._imageList = options.images; + } + if (Object.keys(options).includes('options')) { + this._options = options.options ?? ({} as ViewerOptions); + } + if (Object.keys(options).includes('mode')) { + const mMode = options.mode; + if (this._modeList.includes(mMode as string)) { + this._mode = mMode ?? 'one'; } - const optionsKeys: string[] = Object.keys(this._options); - let divid: string | undefined; - if (optionsKeys.length > 0) { - this._photoViewer.options = this._options; - if (optionsKeys.includes('divid')) { - divid = this._options.divid; - } else { - divid = 'photoviewer-container'; - } + } + if (Object.keys(options).includes('startFrom')) { + const mStartFrom = options.startFrom; + this._startFrom = mStartFrom ?? 0; + } + this._photoViewer = document.createElement('jeep-photoviewer'); + this._photoViewer.imageList = this._imageList; + this._photoViewer.mode = this._mode; + if (this._mode === 'one' || this._mode === 'slider') { + this._photoViewer.startFrom = this._startFrom; + } + const optionsKeys: string[] = Object.keys(this._options); + let divid: string | undefined; + if (optionsKeys.length > 0) { + this._photoViewer.options = this._options; + if (optionsKeys.includes('divid')) { + divid = this._options.divid; } else { divid = 'photoviewer-container'; } - this._container = document.querySelector(`#${divid}`); - // check if already a photoviewer element - if (this._container != null) { - const isPVEl = this._container.querySelector('jeep-photoviewer'); - if (isPVEl != null) { - this._container.removeChild(isPVEl); - } + } else { + divid = 'photoviewer-container'; + } + this._container = document.querySelector(`#${divid}`); + // check if already a photoviewer element + if (this._container != null) { + const isPVEl = this._container.querySelector('jeep-photoviewer'); + if (isPVEl != null) { + this._container.removeChild(isPVEl); + } - this._container.appendChild(this._photoViewer); - await customElements.whenDefined('jeep-photoviewer'); + this._container.appendChild(this._photoViewer); + await customElements.whenDefined('jeep-photoviewer'); - return Promise.resolve({result: true}) - } else { - return Promise.reject("Div id='photoviewer-container' not found"); - } + return Promise.resolve({ result: true }); + } else { + return Promise.reject("Div id='photoviewer-container' not found"); + } } - async saveImageFromHttpToInternal(options: capHttpOptions): Promise { + async saveImageFromHttpToInternal( + options: capHttpOptions, + ): Promise { console.log('saveImageFromHttpToInternal', options); throw this.unimplemented('Not implemented on web.'); } async getInternalImagePaths(): Promise { throw this.unimplemented('Not implemented on web.'); } - + private jeepPhotoViewerResult = (ev: any) => { const res = ev.detail; - if(res !== null) { + if (res !== null) { this.notifyListeners('jeepCapPhotoViewerExit', res); } };