Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ class RNMBXLocationModule(reactContext: ReactApplicationContext) :
}

@ReactMethod
fun addListener(eventName: String?) {
override fun addListener(eventName: String?) {
// Required for rn built in EventEmitter Calls.
}

@ReactMethod
fun removeListeners(count: Int?) {
override fun removeListeners(count: Double) {
// Required for rn built in EventEmitter Calls.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class RNMBXOfflineModule(private val mReactContext: ReactApplicationContext) :
}

@ReactMethod
fun removeListeners(count: Int?) {
fun removeListeners(count: Double) {
// Remove upstream listeners, stop unnecessary background tasks
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,12 @@ protected final void emitOnLocationUpdate(ReadableMap value) {
@ReactMethod
@DoNotStrip
public abstract void setLocationEventThrottle(double throttle);

@ReactMethod
@DoNotStrip
public abstract void addListener(String eventName);

@ReactMethod
@DoNotStrip
public abstract void removeListeners(double count);
}
2 changes: 2 additions & 0 deletions src/specs/NativeRNMBXLocationModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export interface Spec extends TurboModule {
getLastKnownLocation(): Promise<LocationEvent['payload']>
simulateHeading(changesPerSecond: number, increment: number): void
setLocationEventThrottle(throttle: number): void
addListener(eventName: string): void;
removeListeners(count: number): void;

readonly onLocationUpdate: EventEmitter<LocationEvent>
}
Expand Down
Loading