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,11 +13,15 @@ class SnoozeReminderActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
showPickSecondsDialogHelper(config.snoozeTime, true, cancelCallback = { dialogCancelled() }) {
val eventId = intent.getLongExtra(EVENT_ID, 0L)
val event = eventsDB.getEventWithId(eventId)
config.snoozeTime = it / 60
rescheduleReminder(event, it / 60)
finishActivity()
Thread {
val eventId = intent.getLongExtra(EVENT_ID, 0L)
val event = eventsDB.getEventWithId(eventId)
config.snoozeTime = it / 60
rescheduleReminder(event, it / 60)
runOnUiThread {
finishActivity()
}
}.start()
}
}