Skip to content

Commit

Permalink
If task is completed, hide details. Also fixed issue with completed t…
Browse files Browse the repository at this point in the history
…ime formatting
  • Loading branch information
Tim Su committed Sep 17, 2010
1 parent 8b93d0a commit de51220
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions astrid/res/values/styles.xml
Expand Up @@ -62,6 +62,10 @@
<style name="TextAppearance.TAd_ItemDueDate_Overdue" parent="TextAppearance.TAd_ItemDueDate">
<item name="android:textColor">#ffee5555</item>
</style>

<style name="TextAppearance.TAd_ItemDueDate_Completed" parent="TextAppearance.TAd_ItemDueDate">
<item name="android:textColor">#ff777777</item>
</style>

<!-- ============================================== FilterListAdapter == -->

Expand Down
4 changes: 2 additions & 2 deletions astrid/src/com/todoroo/astrid/adapter/TaskAdapter.java
Expand Up @@ -294,7 +294,7 @@ public synchronized void setFieldContentsAndVisibility(View view) {
} else if(task.isCompleted()) {
String dateValue = formatDate(task.getValue(Task.COMPLETION_DATE));
dueDateView.setText(r.getString(R.string.TAd_completed, dateValue));
dueDateView.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemDetails);
dueDateView.setTextAppearance(activity, R.style.TextAppearance_TAd_ItemDueDate_Completed);
setVisibility(dueDateView);
} else {
dueDateView.setVisibility(View.GONE);
Expand Down Expand Up @@ -325,7 +325,7 @@ public synchronized void setFieldContentsAndVisibility(View view) {
details = taskDetailLoader.get(task.getId()).toString();
else
details = task.getValue(Task.DETAILS);
if(TextUtils.isEmpty(details) || DETAIL_SEPARATOR.equals(details)) {
if(TextUtils.isEmpty(details) || DETAIL_SEPARATOR.equals(details) || task.isCompleted()) {
viewHolder.details.setVisibility(View.GONE);
} else {
viewHolder.details.setVisibility(View.VISIBLE);
Expand Down

0 comments on commit de51220

Please sign in to comment.