Add create and modify time debug filters

pull/1061/head
Alex Baker 4 years ago
parent 550d401e74
commit 811c9497e1

@ -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))

@ -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 {

Loading…
Cancel
Save