@sency/react-native-smkit-ui 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,6 +11,7 @@ import com.sency.smkitui.listener.SMKitUIWorkoutListener
11
11
  import com.sency.smkitui.model.ExerciseData
12
12
  import com.sency.smkitui.model.WorkoutSummaryData
13
13
  import com.sency.smkitui.model.smkitui.Custom
14
+ import com.sency.smkitui.model.smkitui.Fitness
14
15
  import com.smkituilibrary.mapper.toSMWorkout
15
16
  import com.smkituilibrary.mapper.toWorkoutConfig
16
17
  import com.smkituilibrary.model.SMKitWorkout
@@ -64,7 +65,12 @@ class SmkitUiLibraryModule(reactContext: ReactApplicationContext) :
64
65
  fun startAssessment(type: String, showSummary: Boolean, customAssessmentId: String, promise: Promise) {
65
66
  this.resultPromise = promise
66
67
  try {
67
- smKitUI?.startAssessment(listener = this, assessmentType = Custom(customAssessmentId))
68
+ val assessmentType = if (type == "fitness") {
69
+ Fitness
70
+ } else {
71
+ Custom(customAssessmentId)
72
+ }
73
+ smKitUI?.startAssessment(listener = this, assessmentType = assessmentType)
68
74
  } catch (e: Exception) {
69
75
  promise.reject("Configure Failed", e)
70
76
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sency/react-native-smkit-ui",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "react-native-smkit-ui",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",