package invalid.lena.rsend

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent

// BootReceiver re-applies the schedule after the device restarts, so periodic
// sync survives reboots even if WorkManager's own state was cleared.
class BootReceiver : BroadcastReceiver() {
    override fun onReceive(context: Context, intent: Intent) {
        if (intent.action == Intent.ACTION_BOOT_COMPLETED) {
            Scheduler.apply(context)
        }
    }
}
