remove a redundant context extension function

This commit is contained in:
tibbi
2017-10-11 20:44:39 +02:00
parent 456459fec8
commit 98cd76041c
2 changed files with 2 additions and 7 deletions

View File

@@ -94,11 +94,6 @@ fun Context.scheduleNextEventReminder(event: Event, dbHelper: DBHelper) {
} }
} }
fun Context.scheduleReminder(event: Event, dbHelper: DBHelper) {
if (event.getReminders().isNotEmpty())
scheduleNextEventReminder(event, dbHelper)
}
fun Context.scheduleEventIn(notifTS: Long, event: Event) { fun Context.scheduleEventIn(notifTS: Long, event: Event) {
if (notifTS < System.currentTimeMillis()) if (notifTS < System.currentTimeMillis())
return return

View File

@@ -210,7 +210,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
} }
context.updateWidgets() context.updateWidgets()
context.scheduleReminder(event, this) context.scheduleNextEventReminder(event, this)
if (addToCalDAV && event.source != SOURCE_SIMPLE_CALENDAR && context.config.caldavSync) { if (addToCalDAV && event.source != SOURCE_SIMPLE_CALENDAR && context.config.caldavSync) {
CalDAVHandler(context).insertCalDAVEvent(event) CalDAVHandler(context).insertCalDAVEvent(event)
@@ -234,7 +234,7 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
} }
context.updateWidgets() context.updateWidgets()
context.scheduleReminder(event, this) context.scheduleNextEventReminder(event, this)
if (updateAtCalDAV && event.source != SOURCE_SIMPLE_CALENDAR && context.config.caldavSync) { if (updateAtCalDAV && event.source != SOURCE_SIMPLE_CALENDAR && context.config.caldavSync) {
CalDAVHandler(context).updateCalDAVEvent(event) CalDAVHandler(context).updateCalDAVEvent(event)
} }