mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-02-17 04:10:45 +01:00
Do not re-import tasks if they already exists!
This commit is contained in:
parent
c70458ec20
commit
908241cb63
@ -67,7 +67,7 @@ class IcsImporter(val activity: SimpleActivity) {
|
||||
): ImportResult {
|
||||
try {
|
||||
val eventTypes = eventsHelper.getEventTypesSync()
|
||||
val existingEvents = activity.eventsDB.getEventsWithImportIds().toMutableList() as ArrayList<Event>
|
||||
val existingEvents = activity.eventsDB.getEventsOrTasksWithImportIds().toMutableList() as ArrayList<Event>
|
||||
val eventsToInsert = ArrayList<Event>()
|
||||
var line = ""
|
||||
|
||||
|
@ -72,8 +72,8 @@ interface EventsDao {
|
||||
@Query("SELECT * FROM events WHERE source = \'$SOURCE_CONTACT_ANNIVERSARY\' AND type = $TYPE_EVENT")
|
||||
fun getAnniversaries(): List<Event>
|
||||
|
||||
@Query("SELECT * FROM events WHERE import_id != \"\" AND type = $TYPE_EVENT")
|
||||
fun getEventsWithImportIds(): List<Event>
|
||||
@Query("SELECT * FROM events WHERE import_id != \"\"")
|
||||
fun getEventsOrTasksWithImportIds(): List<Event>
|
||||
|
||||
@Query("SELECT * FROM events WHERE source = :source AND type = $TYPE_EVENT")
|
||||
fun getEventsFromCalDAVCalendar(source: String): List<Event>
|
||||
|
Loading…
x
Reference in New Issue
Block a user