mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
moving Event storing functions on a background thread too
This commit is contained in:
@ -765,7 +765,9 @@ class EventActivity : SimpleActivity() {
|
|||||||
mEvent.id = 0
|
mEvent.id = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Thread {
|
||||||
storeEvent(wasRepeatable)
|
storeEvent(wasRepeatable)
|
||||||
|
}.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun storeEvent(wasRepeatable: Boolean) {
|
private fun storeEvent(wasRepeatable: Boolean) {
|
||||||
@ -781,6 +783,18 @@ class EventActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mRepeatInterval > 0 && wasRepeatable) {
|
if (mRepeatInterval > 0 && wasRepeatable) {
|
||||||
|
runOnUiThread {
|
||||||
|
showEditRepeatingEventDialog()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
dbHelper.update(mEvent, true, this) {
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showEditRepeatingEventDialog() {
|
||||||
EditRepeatingEventDialog(this) {
|
EditRepeatingEventDialog(this) {
|
||||||
if (it) {
|
if (it) {
|
||||||
dbHelper.update(mEvent, true, this) {
|
dbHelper.update(mEvent, true, this) {
|
||||||
@ -801,12 +815,6 @@ class EventActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
dbHelper.update(mEvent, true, this) {
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateStartTexts() {
|
private fun updateStartTexts() {
|
||||||
|
Reference in New Issue
Block a user