From 00c0707dad4fc98974ae2e8c3d720c7a7521e968 Mon Sep 17 00:00:00 2001 From: Ibby Hadeed Date: Wed, 23 Aug 2017 19:54:11 -0400 Subject: [PATCH] fix(geofence): remove duplicate onTransitionReceived method --- src/@ionic-native/plugins/geofence/index.ts | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/@ionic-native/plugins/geofence/index.ts b/src/@ionic-native/plugins/geofence/index.ts index 44b77241d..a906aca88 100644 --- a/src/@ionic-native/plugins/geofence/index.ts +++ b/src/@ionic-native/plugins/geofence/index.ts @@ -85,7 +85,7 @@ declare const window: any; @Injectable() export class Geofence extends IonicNativePlugin { - public TransitionType = { + TransitionType = { ENTER: 1, EXIT: 2, BOTH: 3 @@ -96,7 +96,7 @@ export class Geofence extends IonicNativePlugin { * @return {Observable} */ @CordovaFunctionOverride() - onTrasitionReceived(): Observable { return; }; + onTransitionReceived(): Observable { return; }; /** * Initializes the plugin. User will be prompted to allow the app to use location and notifications. @@ -139,20 +139,6 @@ export class Geofence extends IonicNativePlugin { @Cordova() getWatched(): Promise { return; }; - /** - * Called when a geofence is crossed in the direction specified by `TransitType`. - * - * @returns {Observable} - */ - onTransitionReceived(): Observable { - - return new Observable((observer) => { - window && window.geofence && (window.geofence.onTransitionReceived = observer.next.bind(observer)); - return () => window.geofence.onTransitionReceived = () => { }; - }); - - } - /** * Called when the user clicks a geofence notification. iOS and Android only. *