mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 13:23:59 +00:00
[android] Round map download percentage
Reviewed-on: https://codeberg.org/comaps/comaps/pulls/1110 Reviewed-by: x7z4w <x7z4w@noreply.codeberg.org> Co-authored-by: gekeleda <git@davidgekeler.eu> Co-committed-by: gekeleda <git@davidgekeler.eu>
This commit is contained in:
@@ -142,9 +142,10 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
|
|||||||
|
|
||||||
if (progress)
|
if (progress)
|
||||||
{
|
{
|
||||||
|
int roundedProgress = Math.round(mCurrentCountry.progress);
|
||||||
mProgress.setPending(false);
|
mProgress.setPending(false);
|
||||||
mProgress.setProgress(Math.round(mCurrentCountry.progress));
|
mProgress.setProgress(roundedProgress);
|
||||||
sizeText = mActivity.getString(R.string.downloader_downloading) + " " + StringUtils.formatPercent(mCurrentCountry.progress / 100);
|
sizeText = mActivity.getString(R.string.downloader_downloading) + " " + StringUtils.formatPercent(roundedProgress / 100.0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user