mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-09 08:28:39 +01:00
move the fetching of local google events in a separate function
This commit is contained in:
parent
038d00ed0a
commit
c9ec5c9606
@ -381,10 +381,14 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
deleteEvents(childIds.toTypedArray())
|
||||
}
|
||||
|
||||
fun deleteGoogleSyncEvents() {
|
||||
fun getGoogleSyncEvents(): List<Event> {
|
||||
val selection = "$COL_SOURCE = $SOURCE_GOOGLE_SYNC"
|
||||
val cursor = getEventsCursor(selection)
|
||||
val events = fillEvents(cursor)
|
||||
return fillEvents(cursor)
|
||||
}
|
||||
|
||||
fun deleteGoogleSyncEvents() {
|
||||
val events = getGoogleSyncEvents()
|
||||
val eventIDs = Array(events.size, { i -> (events[i].id.toString()) })
|
||||
deleteEvents(eventIDs, false)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user