quran / quran-ios

QuranEngine is the engine powering the Quran.com iOS app.
Apache License 2.0
444 stars 150 forks source link

Fix crash when getOnGoingDownloads is called early #595

Closed mohamede1945 closed 9 months ago

mohamede1945 commented 9 months ago

Sometimes DownloadManager.getOnGoingDownloads may be called earlier than DownloadManager.start. This result in a crash.

This change ensures that getOnGoingDownloads awaits the initialization.

codecov[bot] commented 9 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (4f1a562) 42.04% compared to head (b9d4088) 42.16%.

Files Patch % Lines
...urces/Downloader/DownloadBatchDataController.swift 92.30% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #595 +/- ## ========================================== + Coverage 42.04% 42.16% +0.12% ========================================== Files 499 500 +1 Lines 19372 19420 +48 ========================================== + Hits 8144 8189 +45 - Misses 11228 11231 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.