make sure we schedule the notifications of imported events

This commit is contained in:
tibbi 2017-01-26 21:53:18 +01:00
parent 399cb84493
commit 86fd2f6fac
2 changed files with 5 additions and 2 deletions

View File

@ -249,7 +249,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
}
if (mEvent.id == 0) {
dbHelper.insert(mEvent)
dbHelper.insert(mEvent) {}
} else {
dbHelper.update(mEvent)
}

View File

@ -1,6 +1,7 @@
package com.simplemobiletools.calendar.helpers
import android.content.Context
import com.simplemobiletools.calendar.extensions.scheduleNotification
import com.simplemobiletools.calendar.extensions.seconds
import com.simplemobiletools.calendar.helpers.IcsParser.ImportResult.*
import com.simplemobiletools.calendar.models.Event
@ -51,7 +52,9 @@ class IcsParser {
continue
val event = Event(0, curStart, curEnd, curTitle, curDescription, reminderMinutes)
dbHelper.insert(event)
dbHelper.insert(event) {
context.scheduleNotification(event)
}
eventsImported++
resetValues()
}