disable quick filtering if only 1 event type is available
This commit is contained in:
parent
fa3215f639
commit
27e917c807
1 changed files with 8 additions and 4 deletions
|
@ -82,6 +82,10 @@ class EventsHelper(val context: Context) {
|
|||
}
|
||||
|
||||
eventTypesDB.deleteEventTypes(typesToDelete)
|
||||
|
||||
if (getEventTypesSync().size == 1) {
|
||||
config.quickFilterEventTypes = HashSet()
|
||||
}
|
||||
}
|
||||
|
||||
fun insertEvent(event: Event, addToCalDAV: Boolean, showToasts: Boolean, callback: ((id: Long) -> Unit)? = null) {
|
||||
|
@ -267,10 +271,10 @@ class EventsHelper(val context: Context) {
|
|||
events.addAll(getRepeatableEventsFor(fromTS, toTS, eventId, applyTypeFilter))
|
||||
|
||||
events = events
|
||||
.asSequence()
|
||||
.distinct()
|
||||
.filterNot { it.repetitionExceptions.contains(Formatter.getDayCodeFromTS(it.startTS)) }
|
||||
.toMutableList() as ArrayList<Event>
|
||||
.asSequence()
|
||||
.distinct()
|
||||
.filterNot { it.repetitionExceptions.contains(Formatter.getDayCodeFromTS(it.startTS)) }
|
||||
.toMutableList() as ArrayList<Event>
|
||||
|
||||
val eventTypeColors = LongSparseArray<Int>()
|
||||
context.eventTypesDB.getEventTypes().forEach {
|
||||
|
|
Loading…
Reference in a new issue