mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-03-27 08:40:16 +01:00
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() {
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user