fixing some threadin issue at the Snooze reminder activity

This commit is contained in:
tibbi 2018-11-18 17:13:30 +01:00
parent 7985112082
commit f2ba190af4
1 changed files with 9 additions and 5 deletions

View File

@ -13,12 +13,16 @@ class SnoozeReminderActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
showPickSecondsDialogHelper(config.snoozeTime, true, cancelCallback = { dialogCancelled() }) {
Thread {
val eventId = intent.getLongExtra(EVENT_ID, 0L)
val event = eventsDB.getEventWithId(eventId)
config.snoozeTime = it / 60
rescheduleReminder(event, it / 60)
runOnUiThread {
finishActivity()
}
}.start()
}
}
private fun dialogCancelled() {