Skip to content

Commit

Permalink
fix: fix listener naming (#405)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMSchmidt committed Aug 7, 2021
1 parent b0fa500 commit 61c1d12
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/sensors.js
Expand Up @@ -13,12 +13,12 @@ const {
} = NativeModules;

const listenerKeys = new Map([
["accelerometer", "Accelerometer"],
["gyroscope", "Gyroscope"],
["magnetometer", "Magnetometer"],
["barometer", "Barometer"],
["orientation", "Orientation"],
["gravity", "Gravity"],
["accelerometer", "RNSensorsAccelerometer"],
["gyroscope", "RNSensorsGyroscope"],
["magnetometer", "RNSensorsMagnetometer"],
["barometer", "RNSensorsBarometer"],
["orientation", "RNSensorsOrientation"],
["gravity", "RNSensorsGravity"],
]);

const nativeApis = new Map([
Expand Down

2 comments on commit 61c1d12

@hpcplus2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanielMSchmidt
this commit causes the eventType of ios is not matched
image

@kyoz
Copy link

@kyoz kyoz commented on 61c1d12 Aug 18, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And will throw some error like this:

`RNSensorsAccelerometer` is not a supported event type for RNSensorsAccelerometer. Supported events are: `Accelerometer`

Please sign in to comment.