|
|
@ -216,7 +216,7 @@ public class CustomFilterActivity extends InjectingActionBarActivity {
|
|
|
|
getString(R.string.CFC_dueBefore_text),
|
|
|
|
getString(R.string.CFC_dueBefore_text),
|
|
|
|
Query.select(Task.ID).from(Task.TABLE).where(
|
|
|
|
Query.select(Task.ID).from(Task.TABLE).where(
|
|
|
|
Criterion.and(
|
|
|
|
Criterion.and(
|
|
|
|
TaskCriteria.activeVisibleMine(),
|
|
|
|
TaskCriteria.activeAndVisible(),
|
|
|
|
Criterion.or(
|
|
|
|
Criterion.or(
|
|
|
|
Field.field("?").eq(0),
|
|
|
|
Field.field("?").eq(0),
|
|
|
|
Task.DUE_DATE.gt(0)),
|
|
|
|
Task.DUE_DATE.gt(0)),
|
|
|
@ -244,7 +244,7 @@ public class CustomFilterActivity extends InjectingActionBarActivity {
|
|
|
|
IDENTIFIER_IMPORTANCE,
|
|
|
|
IDENTIFIER_IMPORTANCE,
|
|
|
|
getString(R.string.CFC_importance_text),
|
|
|
|
getString(R.string.CFC_importance_text),
|
|
|
|
Query.select(Task.ID).from(Task.TABLE).where(
|
|
|
|
Query.select(Task.ID).from(Task.TABLE).where(
|
|
|
|
Criterion.and(TaskCriteria.activeVisibleMine(),
|
|
|
|
Criterion.and(TaskCriteria.activeAndVisible(),
|
|
|
|
Task.IMPORTANCE.lte("?"))).toString(),
|
|
|
|
Task.IMPORTANCE.lte("?"))).toString(),
|
|
|
|
values, entries,
|
|
|
|
values, entries,
|
|
|
|
entryValues, ((BitmapDrawable)r.getDrawable(R.drawable.tango_warning)).getBitmap(),
|
|
|
|
entryValues, ((BitmapDrawable)r.getDrawable(R.drawable.tango_warning)).getBitmap(),
|
|
|
@ -260,7 +260,7 @@ public class CustomFilterActivity extends InjectingActionBarActivity {
|
|
|
|
IDENTIFIER_TITLE,
|
|
|
|
IDENTIFIER_TITLE,
|
|
|
|
getString(R.string.CFC_title_contains_text),
|
|
|
|
getString(R.string.CFC_title_contains_text),
|
|
|
|
Query.select(Task.ID).from(Task.TABLE).where(
|
|
|
|
Query.select(Task.ID).from(Task.TABLE).where(
|
|
|
|
Criterion.and(TaskCriteria.activeVisibleMine(),
|
|
|
|
Criterion.and(TaskCriteria.activeAndVisible(),
|
|
|
|
Task.TITLE.like("%?%"))).toString(),
|
|
|
|
Task.TITLE.like("%?%"))).toString(),
|
|
|
|
getString(R.string.CFC_title_contains_name), "",
|
|
|
|
getString(R.string.CFC_title_contains_name), "",
|
|
|
|
((BitmapDrawable)r.getDrawable(R.drawable.tango_alpha)).getBitmap(),
|
|
|
|
((BitmapDrawable)r.getDrawable(R.drawable.tango_alpha)).getBitmap(),
|
|
|
@ -411,7 +411,7 @@ public class CustomFilterActivity extends InjectingActionBarActivity {
|
|
|
|
|
|
|
|
|
|
|
|
// special code for all tasks universe
|
|
|
|
// special code for all tasks universe
|
|
|
|
if(instance.criterion.sql == null) {
|
|
|
|
if(instance.criterion.sql == null) {
|
|
|
|
sql.append(TaskCriteria.activeVisibleMine()).append(' ');
|
|
|
|
sql.append(TaskCriteria.activeAndVisible()).append(' ');
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
String subSql = instance.criterion.sql.replace("?", UnaryCriterion.sanitize(value));
|
|
|
|
String subSql = instance.criterion.sql.replace("?", UnaryCriterion.sanitize(value));
|
|
|
|
sql.append(Task.ID).append(" IN (").append(subSql).append(") ");
|
|
|
|
sql.append(Task.ID).append(" IN (").append(subSql).append(") ");
|
|
|
@ -473,7 +473,7 @@ public class CustomFilterActivity extends InjectingActionBarActivity {
|
|
|
|
|
|
|
|
|
|
|
|
// special code for all tasks universe
|
|
|
|
// special code for all tasks universe
|
|
|
|
if(instance.criterion.sql == null) {
|
|
|
|
if(instance.criterion.sql == null) {
|
|
|
|
sql.append(TaskCriteria.activeVisibleMine()).append(' ');
|
|
|
|
sql.append(TaskCriteria.activeAndVisible()).append(' ');
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
String subSql = instance.criterion.sql.replace("?", UnaryCriterion.sanitize(value));
|
|
|
|
String subSql = instance.criterion.sql.replace("?", UnaryCriterion.sanitize(value));
|
|
|
|
subSql = PermaSql.replacePlaceholders(subSql);
|
|
|
|
subSql = PermaSql.replacePlaceholders(subSql);
|
|
|
|