mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
Disallow more than 1 repetition per day
This commit is contained in:
@@ -232,9 +232,15 @@ public class EditHabitFragment extends DialogFragment implements OnClickListener
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if(modified_habit.freq_num <= 0)
|
||||
if(modified_habit.freq_den <= 0)
|
||||
{
|
||||
tvFreqNum.setError("Frequency has to be positive.");
|
||||
tvFreqNum.setError("Number must be positive.");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if(modified_habit.freq_num > modified_habit.freq_den)
|
||||
{
|
||||
tvFreqNum.setError("You can have at most one repetition per day");
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user