Skip to content

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

Merged
merged 2 commits into from
Jul 20, 2019
Merged

Tasks fixes #312

merged 2 commits into from
Jul 20, 2019

Conversation

ekalin
Copy link
Contributor

@ekalin ekalin commented Jul 17, 2019

This fixes the layout for tasks for "All in one line", and supports start dates.

Copy link
Collaborator

@yvolk yvolk left a 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) {
Copy link
Collaborator

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) {
Copy link
Collaborator

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".

ekalin added 2 commits July 18, 2019 20:02
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.
@ekalin
Copy link
Contributor Author

ekalin commented Jul 18, 2019

Everything should be fixed now.

@yvolk yvolk merged commit bfbcc25 into plusonelabs:master Jul 20, 2019
@yvolk yvolk mentioned this pull request Jul 20, 2019
@ekalin ekalin deleted the tasks2 branch July 20, 2019 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants