mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-15 15:41:03 +08:00
fix(safari-view-controller): show should return an Observable
BREAKING CHANGE: `show` method now returns an Observable closes #1619
This commit is contained in:
parent
71349655c0
commit
a6f9714422
@ -1,5 +1,6 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||||
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
export interface SafariViewControllerOptions {
|
export interface SafariViewControllerOptions {
|
||||||
animated?: boolean;
|
animated?: boolean;
|
||||||
@ -74,13 +75,14 @@ export class SafariViewController extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Shows Safari View Controller
|
* Shows Safari View Controller
|
||||||
* @param options {SafariViewControllerOptions} optional
|
* @param options {SafariViewControllerOptions} optional
|
||||||
* @returns {Promise<any>}
|
* @returns {Observable<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
successIndex: 1,
|
successIndex: 1,
|
||||||
errorIndex: 2
|
errorIndex: 2,
|
||||||
|
observable: true
|
||||||
})
|
})
|
||||||
show(options?: SafariViewControllerOptions): Promise<any> { return; }
|
show(options?: SafariViewControllerOptions): Observable<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hides Safari View Controller
|
* Hides Safari View Controller
|
||||||
|
Loading…
x
Reference in New Issue
Block a user