Merge pull request #608 from KristianTashkov/kris/fix_yes_no

Only save numerical habit features if the habit is numerical
pull/610/head
Alinson S. Xavier 5 years ago committed by GitHub
commit b31482881b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -214,9 +214,11 @@ class EditHabitActivity : AppCompatActivity() {
habit.setReminder(Reminder(reminderHour, reminderMin, reminderDays))
}
habit.frequency = Frequency(freqNum, freqDen)
if (habitType == Habit.NUMBER_HABIT) {
habit.targetValue = targetInput.text.toString().toDouble()
habit.targetType = Habit.AT_LEAST
habit.unit = unitInput.text.trim().toString()
}
habit.type = habitType
val command = if (habitId >= 0) {

Loading…
Cancel
Save