diff --git a/app/src/main/java/com/todoroo/astrid/core/BuiltInFilterExposer.kt b/app/src/main/java/com/todoroo/astrid/core/BuiltInFilterExposer.kt index 0a9f1a5e1..bbd8c0956 100644 --- a/app/src/main/java/com/todoroo/astrid/core/BuiltInFilterExposer.kt +++ b/app/src/main/java/com/todoroo/astrid/core/BuiltInFilterExposer.kt @@ -115,6 +115,30 @@ class BuiltInFilterExposer @Inject constructor( } } + fun getNoCreateDateFilter(): Filter { + return Filter( + "No create time", + QueryTemplate() + .where(and( + activeAndVisible(), + Task.CREATION_DATE.eq(0)))) + .apply { + icon = R.drawable.ic_outline_add_24px + } + } + + fun getNoModificationDateFilter(): Filter { + return Filter( + "No modify time", + QueryTemplate() + .where(and( + activeAndVisible(), + Task.MODIFICATION_DATE.eq(0)))) + .apply { + icon = R.drawable.ic_outline_edit_24px + } + } + fun getRecentlyModifiedFilter(r: Resources) = RecentlyModifiedFilter(r.getString(R.string.BFE_Recent)) diff --git a/app/src/main/java/org/tasks/filters/FilterProvider.kt b/app/src/main/java/org/tasks/filters/FilterProvider.kt index 0e21e4ec1..e56ceb26b 100644 --- a/app/src/main/java/org/tasks/filters/FilterProvider.kt +++ b/app/src/main/java/org/tasks/filters/FilterProvider.kt @@ -60,7 +60,9 @@ class FilterProvider @Inject constructor( .apply { if (collapsed) return this } .plus(listOf( BuiltInFilterExposer.getNoListFilter(), - BuiltInFilterExposer.getNoTitleFilter() + BuiltInFilterExposer.getNoTitleFilter(), + BuiltInFilterExposer.getNoCreateDateFilter(), + BuiltInFilterExposer.getNoModificationDateFilter() )) } else {