mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Keeping the foreground service active when downloads are paused due to network errors (especially during network fluctuations), as the Download Manager will retry after some time once the connection is restored.
This commit is contained in:
parent
9444a3d74b
commit
6330a78df2
@ -502,7 +502,8 @@ class DownloadMonitorService : Service() {
|
|||||||
|
|
||||||
private fun getActiveDownloads(): List<DownloadRoomEntity> =
|
private fun getActiveDownloads(): List<DownloadRoomEntity> =
|
||||||
downloadRoomDao.downloadRoomEntity().blockingFirst().filter {
|
downloadRoomDao.downloadRoomEntity().blockingFirst().filter {
|
||||||
it.status != Status.PAUSED && it.status != Status.CANCELLED
|
(it.status != Status.PAUSED || it.error == Error.WAITING_TO_RETRY) &&
|
||||||
|
it.status != Status.CANCELLED
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun updateNotification(
|
private fun updateNotification(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user