package app.furmeet.events.system.helper

import android.app.job.JobInfo
import android.app.job.JobScheduler
import android.os.Build

fun JobScheduler.getPendingJobCompat(jobId: Int): JobInfo? =
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
            getPendingJob(jobId)
        else
            allPendingJobs.firstOrNull { it.id == jobId }
