enable quick event type filter at adding the second event type

This commit is contained in:
tibbi 2021-07-27 15:35:21 +02:00
parent e4915ccb61
commit 662b0fa982
1 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,13 @@ class EventsHelper(val context: Context) {
if (config.quickFilterEventTypes.isNotEmpty()) {
config.addQuickFilterEventType(newId.toString())
} else {
val eventTypes = getEventTypesSync()
if (eventTypes.size == 2) {
eventTypes.forEach {
config.addQuickFilterEventType(it.id.toString())
}
}
}
}
return newId