Fix for new list activity not getting a title

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

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

@ -358,11 +358,8 @@ public class TagViewActivity extends TaskListActivity implements OnTabChangeList
if(tag == null && remoteId == 0 && !newTag)
return;
if(newTag) {
getIntent().putExtra(TOKEN_FILTER, Filter.emptyFilter());
setTitle(getString(R.string.tag_new_list));
findViewById(R.id.taskListFooter).setVisibility(View.GONE);
}
if(newTag)
getIntent().putExtra(TOKEN_FILTER, Filter.emptyFilter(getString(R.string.tag_new_list)));
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)))));

Loading…
Cancel
Save