removing a probably/hopefully redundant function
This commit is contained in:
parent
427a3fa6fc
commit
76c92eea78
|
@ -180,28 +180,6 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
|||
return events
|
||||
}
|
||||
|
||||
private fun getAllDayEvents(fromTS: Long, eventId: Long = -1L, applyTypeFilter: Boolean = false): List<Event> {
|
||||
val events = ArrayList<Event>()
|
||||
var selection = "($COL_FLAGS & $FLAG_ALL_DAY) != 0"
|
||||
if (eventId != -1L)
|
||||
selection += " AND $MAIN_TABLE_NAME.$COL_ID = $eventId"
|
||||
|
||||
if (applyTypeFilter) {
|
||||
val displayEventTypes = context.config.displayEventTypes
|
||||
if (displayEventTypes.isEmpty()) {
|
||||
return ArrayList()
|
||||
} else {
|
||||
val types = TextUtils.join(",", displayEventTypes)
|
||||
selection += " AND $COL_EVENT_TYPE IN ($types)"
|
||||
}
|
||||
}
|
||||
|
||||
val dayCode = Formatter.getDayCodeFromTS(fromTS)
|
||||
val cursor = getEventsCursor(selection)
|
||||
events.addAll(fillEvents(cursor).filter { dayCode == Formatter.getDayCodeFromTS(it.startTS) })
|
||||
return events
|
||||
}
|
||||
|
||||
fun getRunningEvents(): List<Event> {
|
||||
val events = ArrayList<Event>()
|
||||
val ts = getNowSeconds()
|
||||
|
|
|
@ -282,13 +282,7 @@ class EventsHelper(val context: Context) {
|
|||
}
|
||||
}
|
||||
|
||||
/*val selectionArgs = arrayOf(toTS.toString(), fromTS.toString())
|
||||
val cursor = getEventsCursor(selection, selectionArgs)
|
||||
events.addAll(fillEvents(cursor))
|
||||
|
||||
events.addAll(getRepeatableEventsFor(fromTS, toTS, eventId, applyTypeFilter))
|
||||
|
||||
events.addAll(getAllDayEvents(fromTS, eventId, applyTypeFilter))*/
|
||||
// events.addAll(getRepeatableEventsFor(fromTS, toTS, eventId, applyTypeFilter))
|
||||
|
||||
events = events
|
||||
.asSequence()
|
||||
|
|
Loading…
Reference in New Issue