fix #156, allow easier editing all-day events

This commit is contained in:
tibbi 2017-04-22 12:34:22 +02:00
parent 765d69f731
commit f63e7a5924
2 changed files with 2 additions and 4 deletions

View File

@ -354,8 +354,8 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
return
}
val newStartTS = mEventStartDateTime.seconds()
val newEndTS = mEventEndDateTime.seconds()
val newStartTS = mEventStartDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds()
val newEndTS = mEventEndDateTime.withSecondOfMinute(0).withMillisOfSecond(0).seconds()
if (newStartTS > newEndTS) {
toast(R.string.end_before_start)

View File

@ -518,8 +518,6 @@ class DBHelper private constructor(val context: Context) : SQLiteOpenHelper(cont
val flags = cursor.getIntValue(COL_FLAGS)
val repeatLimit = cursor.getIntValue(COL_REPEAT_LIMIT)
val eventType = cursor.getIntValue(COL_EVENT_TYPE)
if (flags and FLAG_ALL_DAY != 0)
endTS -= 1
val ignoreEventOccurrences = if (repeatInterval != 0) {
getIgnoredOccurrences(id)