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