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

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

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

Loading…
Cancel
Save