Use correct progress value when installing updates

This commit is contained in:
Gabriele M
2017-07-07 22:05:22 +02:00
parent 8a559103a9
commit 805e672148

View File

@@ -95,7 +95,9 @@ public class UpdatesListAdapter extends RecyclerView.Adapter<UpdatesListAdapter.
update.getStatus() == UpdateStatus.INSTALLING; update.getStatus() == UpdateStatus.INSTALLING;
viewHolder.mProgressBar.setIndeterminate(indeterminate); viewHolder.mProgressBar.setIndeterminate(indeterminate);
if (!indeterminate) { if (!indeterminate) {
viewHolder.mProgressBar.setProgress(update.getProgress()); boolean installing = update.getStatus() == UpdateStatus.INSTALLING;
viewHolder.mProgressBar.setProgress(
installing ? update.getInstallProgress() : update.getProgress());
} }
if (mUpdaterController.isDownloading(downloadId)) { if (mUpdaterController.isDownloading(downloadId)) {