[refactor] refactor-language-download#11
Conversation
Drop the `force` parameter. this is now handled within the download provider atomically.
|
@holybiber Here's the refactor I've been working on to remove Tests are passing, and local emulators are working, download actually feels even faster at the moment. Would like to take a look and test it before I merge it? |
holybiber
left a comment
There was a problem hiding this comment.
Hi Gabriel, thanks a lot!
This looks good to me. It's good to get rid of download_assets and have our own code instead. I like that you download the pdf and the html archives in parallel, that already doubles the download speed. Did some quick tests on my phone, with the current code downloading all languages took 83s, with this PR it only took 38s.
Can you remove all remaining mentions of download_assets from our documentation?
And then go ahead and merge it!
What?
Create local download manager for languages and remove
download_assetspackage.language_downloaderfeaturearchivedependency and bump minor versionslanguage_downloaderutillanguage_downloaderinto globalslanguage_downloaderinto background_tasklanguage_downloaderinto mainbackground_testpubspecfiles to removedownload_assetslanguages.dartto use the newlanguage_downloaderupdate_language_buttonbackground_taskto use new provider setuplanguage_downloaderand providerdart fixWhy?
This removes an unnecessary dependency on the project, which makes it more reliable,
and less prone to update issues. Which was already happening with the latest version
of
download_assets.How?
Created custom download classes and functions that is able to fetch the two files per
language at the same time and unpack the zip in which they come, as per the current
setup of the application and content distribution.
Testing?
New testes were added, and all automated tests passing locally.
Screenshots (optional)
N/A
Anything Else?
N/A