mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
fix saving of non-numerical habits
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user