Skip to content

Commit 680f9c4

Browse files
Rename getDistance methods in getDistances
1 parent d391a0a commit 680f9c4

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

android/src/main/java/com/ovalmoney/fitness/RNFitnessModule.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,9 @@ public void getSteps(double startDate, double endDate, String interval, Promise
153153
}
154154

155155
@ReactMethod
156-
public void getDistance(double startDate, double endDate, String interval, Promise promise){
156+
public void getDistances(double startDate, double endDate, String interval, Promise promise){
157157
try {
158-
manager.getDistance(getCurrentActivity(), startDate, endDate, interval, promise);
158+
manager.getDistances(getCurrentActivity(), startDate, endDate, interval, promise);
159159
}catch(Error e){
160160
promise.reject(e);
161161
}

android/src/main/java/com/ovalmoney/fitness/manager/Manager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public void onComplete(@NonNull Task<DataReadResponse> task) {
302302
});
303303
}
304304

305-
public void getDistance(Context context, double startDate, double endDate, String customInterval, final Promise promise) {
305+
public void getDistances(Context context, double startDate, double endDate, String customInterval, final Promise promise) {
306306
TimeUnit interval = getInterval(customInterval);
307307

308308
DataReadRequest readRequest = new DataReadRequest.Builder()

ios/RCTFitness/RCTFitness.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ - (NSDictionary *)constantsToExport{
223223
[self.healthStore executeQuery:query];
224224
}
225225

226-
RCT_REMAP_METHOD(getDistance,
226+
RCT_REMAP_METHOD(getDistances,
227227
withStartDate: (double) startDate
228228
andEndDate: (double) endDate
229229
andInterval: (NSString *) customInterval

js/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ const getSteps = ({ startDate, endDate, interval = "days" }) =>
3232
);
3333

3434
/**
35-
* Get native getDistance with parsed Dates
35+
* Get native getDistances with parsed Dates
3636
* @param startDate
3737
* @param endDate
3838
* @returns {*}
3939
*/
40-
const getDistance = ({ startDate, endDate, interval = "days" }) =>
41-
NativeModules.Fitness.getDistance(
40+
const getDistances = ({ startDate, endDate, interval = "days" }) =>
41+
NativeModules.Fitness.getDistances(
4242
parseDate(startDate),
4343
parseDate(endDate),
4444
interval
@@ -106,7 +106,7 @@ export default {
106106
logout,
107107
disconnect,
108108
getSteps,
109-
getDistance,
109+
getDistances,
110110
getCalories,
111111
getHeartRate,
112112
getSleepAnalysis,

0 commit comments

Comments
 (0)