use a background thread for scheduling things after boot
This commit is contained in:
parent
913ec2b1c3
commit
134fd58c1a
|
@ -9,11 +9,13 @@ import com.simplemobiletools.calendar.extensions.scheduleAllEvents
|
||||||
|
|
||||||
class BootCompletedReceiver : BroadcastReceiver() {
|
class BootCompletedReceiver : BroadcastReceiver() {
|
||||||
|
|
||||||
override fun onReceive(context: Context, arg1: Intent) {
|
override fun onReceive(context: Context, intent: Intent) {
|
||||||
context.apply {
|
Thread {
|
||||||
scheduleAllEvents()
|
context.apply {
|
||||||
notifyRunningEvents()
|
scheduleAllEvents()
|
||||||
recheckCalDAVCalendars {}
|
notifyRunningEvents()
|
||||||
}
|
recheckCalDAVCalendars {}
|
||||||
|
}
|
||||||
|
}.start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue