subtract a day from all-day events lasting multiple days
This commit is contained in:
parent
31061141d8
commit
34e1717dcd
|
@ -14,6 +14,7 @@ import com.simplemobiletools.calendar.activities.SettingsActivity
|
|||
import com.simplemobiletools.calendar.extensions.config
|
||||
import com.simplemobiletools.calendar.extensions.dbHelper
|
||||
import com.simplemobiletools.calendar.extensions.seconds
|
||||
import com.simplemobiletools.calendar.helpers.DAY
|
||||
import com.simplemobiletools.calendar.helpers.FLAG_ALL_DAY
|
||||
import com.simplemobiletools.calendar.helpers.Parser
|
||||
import com.simplemobiletools.calendar.helpers.RRULE
|
||||
|
@ -128,6 +129,10 @@ class FetchGoogleEventsTask(val activity: Activity, credential: GoogleAccountCre
|
|||
reminders.getOrElse(2, { -1 }), repeatRule.repeatInterval, importId, flags, repeatRule.repeatLimit, repeatRule.repeatRule,
|
||||
eventTypeId)
|
||||
|
||||
if (event.isAllDay && endTS > startTS) {
|
||||
event.endTS -= DAY
|
||||
}
|
||||
|
||||
importIDs.add(importId)
|
||||
dbHelper.insert(event) {}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue