haiwen / seadroid

Android client for Seafile
Other
540 stars 277 forks source link

Fix download progress percetange being always zero #959

Closed FluffyDiscord closed 1 year ago

FluffyDiscord commented 1 year ago

This PR changes how the percentage is being calculated.

It moves from couting processed/remaining total bytes to counting just tasks.

This fixes an issue, where you would be downloading 10 files, first 9 would be 1MB of size and the last one would be 1GB and the percentage would remain at zero untill the last big file starts downloading. With this PR its gonna be at 90% before the last big file starts downloading.

The optimal notification should show more info, but that's for the next time. Example of advanced notification info Screenshot_20230214_005534_Smart Launcher