mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-01-22 06:56:46 +01:00
move event storing in EventActivity in a separate function
This commit is contained in:
parent
58faeda4b3
commit
011c6024db
@ -439,7 +439,6 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
||||
val wasRepeatable = mEvent.repeatInterval > 0
|
||||
|
||||
val reminders = sortedSetOf(mReminder1Minutes, mReminder2Minutes, mReminder3Minutes).filter { it != REMINDER_OFF }
|
||||
val dbHelper = DBHelper.newInstance(applicationContext, this)
|
||||
val newDescription = event_description.value
|
||||
mEvent.apply {
|
||||
startTS = newStartTS
|
||||
@ -460,6 +459,10 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
||||
source = "Simple Calendar"
|
||||
}
|
||||
|
||||
storeEvent(wasRepeatable)
|
||||
}
|
||||
|
||||
private fun storeEvent(wasRepeatable: Boolean) {
|
||||
if (mEvent.id == 0) {
|
||||
dbHelper.insert(mEvent) {
|
||||
if (DateTime.now().isAfter(mEventStartDateTime.millis)) {
|
||||
|
Loading…
Reference in New Issue
Block a user