diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionInstallService.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionInstallService.kt index 167bf65367..0487f09c92 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionInstallService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionInstallService.kt @@ -109,7 +109,7 @@ class ExtensionInstallService( } job?.invokeOnCompletion { - if (showUpdatedNotification) { + if (showUpdatedNotification && installedExtensions.size > 0) { notifier.showUpdatedNotification(installedExtensions, preferences.hideNotificationContent()) } if (reRunUpdateCheck || installedExtensions.size != list.size) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt index 4f8c6458d5..c1682ce620 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt @@ -61,22 +61,24 @@ class ExtensionUpdateJob(private val context: Context, workerParams: WorkerParam val extensionManager = Injekt.get() val extensionsInstalledByApp = extensions.filter { extensionManager.isInstalledByApp(it) } - val intent = - ExtensionInstallService.jobIntent( - context, - extensionsInstalledByApp, - // Re reun this job if not all the extensions can be auto updated - if (extensionsInstalledByApp.size == extensions.size) { - 1 - } else { - 2 - } - ) - context.startForegroundService(intent) - if (extensionsInstalledByApp.size == extensions.size) { - return - } else { - extensions.removeAll(extensionsInstalledByApp) + if (extensionsInstalledByApp.isNotEmpty()) { + val intent = + ExtensionInstallService.jobIntent( + context, + extensionsInstalledByApp, + // Re run this job if not all the extensions can be auto updated + if (extensionsInstalledByApp.size == extensions.size) { + 1 + } else { + 2 + } + ) + context.startForegroundService(intent) + if (extensionsInstalledByApp.size == extensions.size) { + return + } else { + extensions.removeAll(extensionsInstalledByApp) + } } } else { runJobAgain(context, NetworkType.UNMETERED)