ignore the photoFetcher at Android versions below 7

This commit is contained in:
tibbi 2019-03-10 09:58:50 +01:00
parent bee4b0ff72
commit 5592c23c4e

View file

@ -368,9 +368,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
private fun startNewPhotoFetcher() {
val photoFetcher = NewPhotoFetcher()
if (isNougatPlus() && !photoFetcher.isScheduled(applicationContext)) {
photoFetcher.scheduleJob(applicationContext)
if (isNougatPlus()) {
val photoFetcher = NewPhotoFetcher()
if (!photoFetcher.isScheduled(applicationContext)) {
photoFetcher.scheduleJob(applicationContext)
}
}
}