Skip to content

Commit

Permalink
fix(geofence): remove duplicate onTransitionReceived method
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Aug 23, 2017
1 parent 79f88d6 commit 00c0707
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/@ionic-native/plugins/geofence/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ declare const window: any;
@Injectable()
export class Geofence extends IonicNativePlugin {

public TransitionType = {
TransitionType = {
ENTER: 1,
EXIT: 2,
BOTH: 3
Expand All @@ -96,7 +96,7 @@ export class Geofence extends IonicNativePlugin {
* @return {Observable<any>}
*/
@CordovaFunctionOverride()
onTrasitionReceived(): Observable<any> { return; };
onTransitionReceived(): Observable<any> { return; };

/**
* Initializes the plugin. User will be prompted to allow the app to use location and notifications.
Expand Down Expand Up @@ -139,20 +139,6 @@ export class Geofence extends IonicNativePlugin {
@Cordova()
getWatched(): Promise<string> { return; };

/**
* Called when a geofence is crossed in the direction specified by `TransitType`.
*
* @returns {Observable<any>}
*/
onTransitionReceived(): Observable<any> {

return new Observable<any>((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.
*
Expand Down

0 comments on commit 00c0707

Please sign in to comment.