From 6bd519a87508e44a17b0e947580fa125770f33f4 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Thu, 12 Dec 2024 16:47:06 +0530 Subject: [PATCH] Fixed: detekt issue. --- .../core/downloader/downloadManager/DownloadManagerMonitor.kt | 3 ++- .../core/downloader/downloadManager/DownloadMonitorService.kt | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadManagerMonitor.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadManagerMonitor.kt index 787c75c40a..fc633d2b2e 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadManagerMonitor.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadManagerMonitor.kt @@ -118,7 +118,8 @@ class DownloadManagerMonitor @Inject constructor( ( isQueuedForWiFiAndConnected(download) || isQueuedForNetwork(download) || - (download.error == Error.WAITING_TO_RETRY || download.error == Error.PAUSED_UNKNOWN) + download.error == Error.WAITING_TO_RETRY || + download.error == Error.PAUSED_UNKNOWN ) && NetworkUtils.isNetworkAvailable(context) && !download.pausedByUser diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadMonitorService.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadMonitorService.kt index f539ed46b5..19f76b8711 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadMonitorService.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/downloader/downloadManager/DownloadMonitorService.kt @@ -587,7 +587,8 @@ class DownloadMonitorService : Service() { ( isQueuedForWiFiAndConnected(download) || isQueuedForNetwork(download) || - download.error == Error.WAITING_TO_RETRY + download.error == Error.WAITING_TO_RETRY || + download.error == Error.PAUSED_UNKNOWN ) && NetworkUtils.isNetworkAvailable(this) && !download.pausedByUser