diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/DBHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/DBHelper.kt index 28dda70de..c242b0752 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/DBHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/DBHelper.kt @@ -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 { - val events = ArrayList() - 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 { val events = ArrayList() val ts = getNowSeconds() diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt index 379864627..373f6334c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/EventsHelper.kt @@ -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()