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.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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user