Only enable total progress when downloads > 1

Otherwise the total progress will just match the one package and be
pretty useless.
This commit is contained in:
morganamilo 2021-04-18 20:59:44 +01:00 committed by Allan McRae
parent 41f9c50abf
commit 079b9d44e2

View file

@ -340,7 +340,7 @@ void cb_event(alpm_event_t *event)
on_progress = 1; on_progress = 1;
list_total_pkgs = event->pkg_retrieve.num; list_total_pkgs = event->pkg_retrieve.num;
list_total = event->pkg_retrieve.total_size; list_total = event->pkg_retrieve.total_size;
total_enabled = list_total && dload_progressbar_enabled(); total_enabled = list_total && list_total_pkgs > 1 && dload_progressbar_enabled();
if(total_enabled) { if(total_enabled) {
init_total_progressbar(); init_total_progressbar();