mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2024-12-24 15:31:05 +01:00
handle a couple more threading issues related to storing events
This commit is contained in:
parent
6ec9792aa0
commit
9e06f1f338
@ -797,22 +797,26 @@ class EventActivity : SimpleActivity() {
|
||||
private fun showEditRepeatingEventDialog() {
|
||||
EditRepeatingEventDialog(this) {
|
||||
if (it) {
|
||||
dbHelper.update(mEvent, true, this) {
|
||||
finish()
|
||||
}
|
||||
Thread {
|
||||
dbHelper.update(mEvent, true, this) {
|
||||
finish()
|
||||
}
|
||||
}.start()
|
||||
} else {
|
||||
dbHelper.addEventRepeatException(mEvent.id!!, mEventOccurrenceTS, true)
|
||||
mEvent.apply {
|
||||
parentId = id!!.toLong()
|
||||
id = null
|
||||
repeatRule = 0
|
||||
repeatInterval = 0
|
||||
repeatLimit = 0
|
||||
}
|
||||
Thread {
|
||||
dbHelper.addEventRepeatException(mEvent.id!!, mEventOccurrenceTS, true)
|
||||
mEvent.apply {
|
||||
parentId = id!!.toLong()
|
||||
id = null
|
||||
repeatRule = 0
|
||||
repeatInterval = 0
|
||||
repeatLimit = 0
|
||||
}
|
||||
|
||||
dbHelper.insert(mEvent, true, this) {
|
||||
finish()
|
||||
}
|
||||
dbHelper.insert(mEvent, true, this) {
|
||||
finish()
|
||||
}
|
||||
}.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user