Skip to content

Commit

Permalink
fix(safari-view-controller): show should return an Observable
Browse files Browse the repository at this point in the history
BREAKING CHANGE: `show` method now returns an Observable

closes #1619
  • Loading branch information
ihadeed committed Jul 10, 2017
1 parent 7134965 commit a6f9714
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/@ionic-native/plugins/safari-view-controller/index.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -74,13 +75,14 @@ export class SafariViewController extends IonicNativePlugin {
/**
* Shows Safari View Controller
* @param options {SafariViewControllerOptions} optional
* @returns {Promise<any>}
* @returns {Observable<any>}
*/
@Cordova({
successIndex: 1,
errorIndex: 2
errorIndex: 2,
observable: true
})
show(options?: SafariViewControllerOptions): Promise<any> { return; }
show(options?: SafariViewControllerOptions): Observable<any> { return; }

/**
* Hides Safari View Controller
Expand Down

0 comments on commit a6f9714

Please sign in to comment.