Remove 'Finished' string

pull/757/head
Alex Baker 7 years ago
parent 3fbf0be594
commit c46487d342

@ -32,7 +32,6 @@ class ViewHolder extends RecyclerView.ViewHolder {
private final CheckBoxes checkBoxes; private final CheckBoxes checkBoxes;
private final TagFormatter tagFormatter; private final TagFormatter tagFormatter;
private final int textColorSecondary; private final int textColorSecondary;
private final int textColorHint;
private final TaskDao taskDao; private final TaskDao taskDao;
private final ViewHolderCallbacks callback; private final ViewHolderCallbacks callback;
private final DisplayMetrics metrics; private final DisplayMetrics metrics;
@ -73,7 +72,6 @@ class ViewHolder extends RecyclerView.ViewHolder {
TagFormatter tagFormatter, TagFormatter tagFormatter,
int textColorOverdue, int textColorOverdue,
int textColorSecondary, int textColorSecondary,
int textColorHint,
TaskDao taskDao, TaskDao taskDao,
ViewHolderCallbacks callback, ViewHolderCallbacks callback,
DisplayMetrics metrics, DisplayMetrics metrics,
@ -86,7 +84,6 @@ class ViewHolder extends RecyclerView.ViewHolder {
this.tagFormatter = tagFormatter; this.tagFormatter = tagFormatter;
this.textColorOverdue = textColorOverdue; this.textColorOverdue = textColorOverdue;
this.textColorSecondary = textColorSecondary; this.textColorSecondary = textColorSecondary;
this.textColorHint = textColorHint;
this.taskDao = taskDao; this.taskDao = taskDao;
this.callback = callback; this.callback = callback;
this.metrics = metrics; this.metrics = metrics;
@ -190,15 +187,12 @@ class ViewHolder extends RecyclerView.ViewHolder {
} }
private void setTaskAppearance() { private void setTaskAppearance() {
boolean completed = task.isCompleted(); if (task.isCompleted()) {
nameView.setEnabled(false);
TextView name = nameView; nameView.setPaintFlags(nameView.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
if (completed) {
name.setEnabled(false);
name.setPaintFlags(name.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
} else { } else {
name.setEnabled(true); nameView.setEnabled(true);
name.setPaintFlags(name.getPaintFlags() & ~Paint.STRIKE_THRU_TEXT_FLAG); nameView.setPaintFlags(nameView.getPaintFlags() & ~Paint.STRIKE_THRU_TEXT_FLAG);
} }
setupDueDateAndTags(); setupDueDateAndTags();
@ -235,12 +229,6 @@ class ViewHolder extends RecyclerView.ViewHolder {
String dateValue = DateUtilities.getRelativeDateStringWithTime(context, dueDate); String dateValue = DateUtilities.getRelativeDateStringWithTime(context, dueDate);
dueDateView.setText(dateValue); dueDateView.setText(dateValue);
dueDateView.setVisibility(View.VISIBLE); dueDateView.setVisibility(View.VISIBLE);
} else if (task.isCompleted()) {
String dateValue =
DateUtilities.getRelativeDateStringWithTime(context, task.getCompletionDate());
dueDateView.setText(context.getResources().getString(R.string.TAd_completed, dateValue));
dueDateView.setTextColor(textColorHint);
dueDateView.setVisibility(View.VISIBLE);
} else { } else {
dueDateView.setVisibility(View.GONE); dueDateView.setVisibility(View.GONE);
} }

@ -19,7 +19,6 @@ import org.tasks.ui.CheckBoxes;
public class ViewHolderFactory { public class ViewHolderFactory {
private final int textColorSecondary; private final int textColorSecondary;
private final int textColorHint;
private final int textColorOverdue; private final int textColorOverdue;
private final Context context; private final Context context;
private final CheckBoxes checkBoxes; private final CheckBoxes checkBoxes;
@ -44,7 +43,6 @@ public class ViewHolderFactory {
this.tagFormatter = tagFormatter; this.tagFormatter = tagFormatter;
this.taskDao = taskDao; this.taskDao = taskDao;
textColorSecondary = getData(context, android.R.attr.textColorSecondary); textColorSecondary = getData(context, android.R.attr.textColorSecondary);
textColorHint = getData(context, android.R.attr.textColorTertiary);
textColorOverdue = getColor(context, R.color.overdue); textColorOverdue = getColor(context, R.color.overdue);
background = getResourceId(context, R.attr.selectableItemBackground); background = getResourceId(context, R.attr.selectableItemBackground);
selectedColor = getData(context, R.attr.colorControlHighlight); selectedColor = getData(context, R.attr.colorControlHighlight);
@ -65,7 +63,6 @@ public class ViewHolderFactory {
tagFormatter, tagFormatter,
textColorOverdue, textColorOverdue,
textColorSecondary, textColorSecondary,
textColorHint,
taskDao, taskDao,
callbacks, callbacks,
metrics, metrics,

@ -6,7 +6,6 @@ import static com.todoroo.andlib.utility.AndroidUtilities.atLeastJellybeanMR1;
import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetManager;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Resources;
import android.database.Cursor; import android.database.Cursor;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Paint; import android.graphics.Paint;
@ -238,15 +237,10 @@ class ScrollableViewsFactory implements RemoteViewsService.RemoteViewsFactory {
private void formatDueDate(RemoteViews row, Task task) { private void formatDueDate(RemoteViews row, Task task) {
if (task.hasDueDate()) { if (task.hasDueDate()) {
Resources resources = context.getResources();
row.setViewVisibility(R.id.widget_due_date, View.VISIBLE); row.setViewVisibility(R.id.widget_due_date, View.VISIBLE);
row.setTextViewText( row.setTextViewText(
R.id.widget_due_date, R.id.widget_due_date,
task.isCompleted() DateUtilities.getRelativeDateStringWithTime(context, task.getDueDate()));
? resources.getString(
R.string.TAd_completed,
DateUtilities.getRelativeDateStringWithTime(context, task.getCompletionDate()))
: DateUtilities.getRelativeDateStringWithTime(context, task.getDueDate()));
//noinspection ResourceAsColor //noinspection ResourceAsColor
row.setTextColor( row.setTextColor(
R.id.widget_due_date, R.id.widget_due_date,

@ -97,9 +97,6 @@ File %1$s contained %2$s.\n\n
<!-- Format string to indicate task is hidden (%s => task name) --> <!-- Format string to indicate task is hidden (%s => task name) -->
<string name="TAd_hiddenFormat">%s [hidden]</string> <string name="TAd_hiddenFormat">%s [hidden]</string>
<!-- slide 22b: indicates task was completed. %s => date or time ago -->
<string name="TAd_completed">Finished\n%s</string>
<!-- slide 15a: Action Button: edit task --> <!-- slide 15a: Action Button: edit task -->
<string name="TAd_actionEditTask">Edit</string> <string name="TAd_actionEditTask">Edit</string>
<string name="action_call">Call</string> <string name="action_call">Call</string>

Loading…
Cancel
Save