Merge pull request #608 from KristianTashkov/kris/fix_yes_no
Only save numerical habit features if the habit is numerical
This commit is contained in:
commit
b31482881b
@ -214,9 +214,11 @@ class EditHabitActivity : AppCompatActivity() {
|
|||||||
habit.setReminder(Reminder(reminderHour, reminderMin, reminderDays))
|
habit.setReminder(Reminder(reminderHour, reminderMin, reminderDays))
|
||||||
}
|
}
|
||||||
habit.frequency = Frequency(freqNum, freqDen)
|
habit.frequency = Frequency(freqNum, freqDen)
|
||||||
habit.targetValue = targetInput.text.toString().toDouble()
|
if (habitType == Habit.NUMBER_HABIT) {
|
||||||
habit.targetType = Habit.AT_LEAST
|
habit.targetValue = targetInput.text.toString().toDouble()
|
||||||
habit.unit = unitInput.text.trim().toString()
|
habit.targetType = Habit.AT_LEAST
|
||||||
|
habit.unit = unitInput.text.trim().toString()
|
||||||
|
}
|
||||||
habit.type = habitType
|
habit.type = habitType
|
||||||
|
|
||||||
val command = if (habitId >= 0) {
|
val command = if (habitId >= 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user