mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
avoid exporting the same event twice
This commit is contained in:
@ -437,7 +437,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
|
||||
fun getEventsToExport(includePast: Boolean): ArrayList<Event> {
|
||||
val currTime = (System.currentTimeMillis() / 1000).toString()
|
||||
val events = ArrayList<Event>()
|
||||
var events = ArrayList<Event>()
|
||||
|
||||
// non repeating events
|
||||
var cursor = if (includePast) {
|
||||
@ -457,6 +457,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
|
||||
events.addAll(fillEvents(cursor))
|
||||
}
|
||||
|
||||
events = events.distinctBy { it.id } as ArrayList<Event>
|
||||
return events
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user