fixing some threadin issue at the Snooze reminder activity
This commit is contained in:
parent
7985112082
commit
f2ba190af4
|
@ -13,12 +13,16 @@ class SnoozeReminderActivity : AppCompatActivity() {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
showPickSecondsDialogHelper(config.snoozeTime, true, cancelCallback = { dialogCancelled() }) {
|
showPickSecondsDialogHelper(config.snoozeTime, true, cancelCallback = { dialogCancelled() }) {
|
||||||
|
Thread {
|
||||||
val eventId = intent.getLongExtra(EVENT_ID, 0L)
|
val eventId = intent.getLongExtra(EVENT_ID, 0L)
|
||||||
val event = eventsDB.getEventWithId(eventId)
|
val event = eventsDB.getEventWithId(eventId)
|
||||||
config.snoozeTime = it / 60
|
config.snoozeTime = it / 60
|
||||||
rescheduleReminder(event, it / 60)
|
rescheduleReminder(event, it / 60)
|
||||||
|
runOnUiThread {
|
||||||
finishActivity()
|
finishActivity()
|
||||||
}
|
}
|
||||||
|
}.start()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun dialogCancelled() {
|
private fun dialogCancelled() {
|
||||||
|
|
Loading…
Reference in New Issue