mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-19 16:52:53 +08:00
fix(geofence): remove duplicate onTransitionReceived method
This commit is contained in:
parent
79f88d6a02
commit
00c0707dad
@ -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<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.
|
||||
@ -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.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user