use a background thread for scheduling things after boot

This commit is contained in:
tibbi 2018-03-30 10:50:26 +02:00
parent 913ec2b1c3
commit 134fd58c1a
1 changed files with 8 additions and 6 deletions

View File

@ -9,11 +9,13 @@ import com.simplemobiletools.calendar.extensions.scheduleAllEvents
class BootCompletedReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, arg1: Intent) {
context.apply {
scheduleAllEvents()
notifyRunningEvents()
recheckCalDAVCalendars {}
}
override fun onReceive(context: Context, intent: Intent) {
Thread {
context.apply {
scheduleAllEvents()
notifyRunningEvents()
recheckCalDAVCalendars {}
}
}.start()
}
}