diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt index 2d838281b..f0eaac7cd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt @@ -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) + } } }