From a6f9714422a960ee8464d678b7d727a0994550fb Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Mon, 10 Jul 2017 09:13:24 -0400 Subject: [PATCH] fix(safari-view-controller): show should return an Observable BREAKING CHANGE: `show` method now returns an Observable closes #1619 --- src/@ionic-native/plugins/safari-view-controller/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/@ionic-native/plugins/safari-view-controller/index.ts b/src/@ionic-native/plugins/safari-view-controller/index.ts index 2112b959b1..1733fed769 100644 --- a/src/@ionic-native/plugins/safari-view-controller/index.ts +++ b/src/@ionic-native/plugins/safari-view-controller/index.ts @@ -1,5 +1,6 @@ import { Injectable } from '@angular/core'; import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core'; +import { Observable } from 'rxjs/Observable'; export interface SafariViewControllerOptions { animated?: boolean; @@ -74,13 +75,14 @@ export class SafariViewController extends IonicNativePlugin { /** * Shows Safari View Controller * @param options {SafariViewControllerOptions} optional - * @returns {Promise} + * @returns {Observable} */ @Cordova({ successIndex: 1, - errorIndex: 2 + errorIndex: 2, + observable: true }) - show(options?: SafariViewControllerOptions): Promise { return; } + show(options?: SafariViewControllerOptions): Observable { return; } /** * Hides Safari View Controller