Fix for new list activity not getting a title

pull/14/head
Tim Su 15 years ago
parent 950d7f1ab2
commit 5aad0b95cf

@ -164,10 +164,11 @@ public class Filter extends FilterListItem {
}; };
/** /**
* @param title
* @return a filter that matches nothing * @return a filter that matches nothing
*/ */
public static Filter emptyFilter() { public static Filter emptyFilter(String title) {
return new Filter("", "", //$NON-NLS-1$ //$NON-NLS-2$ return new Filter(title, title,
new QueryTemplate().where(Criterion.none), null); new QueryTemplate().where(Criterion.none), null);
} }
} }

@ -358,11 +358,8 @@ public class TagViewActivity extends TaskListActivity implements OnTabChangeList
if(tag == null && remoteId == 0 && !newTag) if(tag == null && remoteId == 0 && !newTag)
return; return;
if(newTag) { if(newTag)
getIntent().putExtra(TOKEN_FILTER, Filter.emptyFilter()); getIntent().putExtra(TOKEN_FILTER, Filter.emptyFilter(getString(R.string.tag_new_list)));
setTitle(getString(R.string.tag_new_list));
findViewById(R.id.taskListFooter).setVisibility(View.GONE);
}
TodorooCursor<TagData> cursor = tagDataService.query(Query.select(TagData.PROPERTIES).where(Criterion.or(TagData.NAME.eq(tag), TodorooCursor<TagData> cursor = tagDataService.query(Query.select(TagData.PROPERTIES).where(Criterion.or(TagData.NAME.eq(tag),
Criterion.and(TagData.REMOTE_ID.gt(0), TagData.REMOTE_ID.eq(remoteId))))); Criterion.and(TagData.REMOTE_ID.gt(0), TagData.REMOTE_ID.eq(remoteId)))));

Loading…
Cancel
Save