Skip to content

Commit

Permalink
Merge pull request #87 from OvalMoney/release/0.5.1
Browse files Browse the repository at this point in the history
Release/0.5.1
  • Loading branch information
franceto authored Dec 1, 2020
2 parents 7783bfd + 9fbe60b commit 3fdf681
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ public void getSteps(double startDate, double endDate, String interval, Promise
}

@ReactMethod
public void getDistance(double startDate, double endDate, String interval, Promise promise){
public void getDistances(double startDate, double endDate, String interval, Promise promise){
try {
manager.getDistance(getCurrentActivity(), startDate, endDate, interval, promise);
manager.getDistances(getCurrentActivity(), startDate, endDate, interval, promise);
}catch(Error e){
promise.reject(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public void onComplete(@NonNull Task<DataReadResponse> task) {
});
}

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

DataReadRequest readRequest = new DataReadRequest.Builder()
Expand Down
2 changes: 1 addition & 1 deletion ios/RCTFitness/RCTFitness.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ - (NSDictionary *)constantsToExport{
[self.healthStore executeQuery:query];
}

RCT_REMAP_METHOD(getDistance,
RCT_REMAP_METHOD(getDistances,
withStartDate: (double) startDate
andEndDate: (double) endDate
andInterval: (NSString *) customInterval
Expand Down
8 changes: 4 additions & 4 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ const getSteps = ({ startDate, endDate, interval = "days" }) =>
);

/**
* Get native getDistance with parsed Dates
* Get native getDistances with parsed Dates
* @param startDate
* @param endDate
* @returns {*}
*/
const getDistance = ({ startDate, endDate, interval = "days" }) =>
NativeModules.Fitness.getDistance(
const getDistances = ({ startDate, endDate, interval = "days" }) =>
NativeModules.Fitness.getDistances(
parseDate(startDate),
parseDate(endDate),
interval
Expand Down Expand Up @@ -106,7 +106,7 @@ export default {
logout,
disconnect,
getSteps,
getDistance,
getDistances,
getCalories,
getHeartRate,
getSleepAnalysis,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ovalmoney/react-native-fitness",
"version": "0.5.0",
"version": "0.5.1",
"description": "A React Native package that gives you access to Apple kit and Google Fit data.",
"main": "./js/index.js",
"keywords": [
Expand Down

0 comments on commit 3fdf681

Please sign in to comment.