-
Notifications
You must be signed in to change notification settings - Fork 945
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting custom start of the day #621
Conversation
6787f3c
to
ae18b19
Compare
Thank you for the pull request, @KristianTashkov. Unfortunately, this pull request tries to accomplish too many things at the same time, which makes it very hard for me to review it. Could you please:
|
ae18b19
to
a5547fc
Compare
@iSoron Thanks for the feedback! |
Thanks, that's fine. I will review it soon. |
I am getting an exception after the following steps:
The exception is below:
If we remove the check that causes the exception, the app does not crash, but the checkmark is added to the incorrect date. Before fixing this crash, could you try to write an automated test to detect it? |
a20d71e
to
aa8bc2b
Compare
Hey @iSoron did you change anything before getting this exception, because I can't reproduce it.
To get the behavior you explained it means the second location also applies the offset and it shouldn't. |
aa8bc2b
to
c5a04d9
Compare
@KristianTashkov Never mind, it seems like I accidentally showed the notification, then set the clock to a time before the notification was supposed to appear. This is an issue, but it's not related to your patch. The PR looks fine now, but I would like to test it a bit more around changes in daylight saving times, just to make sure nothing weird happens. I will keep you updated. |
Merged! Thanks again, @KristianTashkov. Regarding the changes that I asked you to revert:
|
|
Definitely. I'd say e.g. people who work at night may have a different idea of what is reasonable compared to most. |
Strongly agree, considering I'm posting this at about 4:30 AM. Some other day-based software (the example I'm aware of is Anki https://github.com/ankitects/anki) have the option to reset a day at any hour, which lets me use them effectively. A cursory glance at the code makes it seem like it wouldn't require major changes to support any time uhabits/uhabits-core/src/jvmMain/java/org/isoron/uhabits/core/utils/DateUtils.kt Lines 37 to 38 in 856a072
and that it may only take an interface/preference change uhabits/uhabits-android/src/main/java/org/isoron/uhabits/HabitsApplication.kt Lines 73 to 77 in 856a072
I'm not familiar enough with Android development to know, but is that correct? |
Implements #607.
As usual waiting for feedback from @iSoron before I start writing tests for the functionality and will be dog fooding this version in the mean time.