-
Notifications
You must be signed in to change notification settings - Fork 129
Tasks fixes #312
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
Tasks fixes #312
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase your code on current master.
@@ -32,6 +35,19 @@ public int getDaysFromToday() { | |||
startDate.withTimeAtStartOfDay()).getDays(); | |||
} | |||
|
|||
public CharSequence getDaysFromTodayString(Context context, int daysFromToday) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving the formatting method (which is about presentation) to the data class is incorrect.
protected DateTime getDueDate(Long dueMillis) { | ||
if (dueMillis == null) { | ||
return now.withTimeAtStartOfDay(); | ||
protected DateTime getDueDate(Long dueMillis, Long startMillis) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"getDueDate" should return due date. Logic of choosing, which date to take for showing in the widget, should be clear and explicit and definitely shouldn't be called "getDueDate".
If there is a due date, the start date is ignored. But if there is no due date but there is a start date, the start date is used as the task's date.
Everything should be fixed now. |
This fixes the layout for tasks for "All in one line", and supports start dates.