fix download size not shown during updates

This commit is contained in:
Chris Cromer 2017-11-11 21:27:59 -03:00
parent 61654163b0
commit 3a9ee17692
2 changed files with 10 additions and 2 deletions

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Pamac\n"
"Report-Msgid-Bugs-To: cromer@cromnix.org\n"
"POT-Creation-Date: 2017-11-11 21:03-0300\n"
"POT-Creation-Date: 2017-11-11 21:27-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -633,6 +633,10 @@ namespace Pamac {
if (alpm_pkg == null) {
alpm_pkg = get_syncpkg (pkgname);
}
unowned Alpm.Package? alpm_pkg_sync = get_syncpkg (alpm_pkg.name);
if (alpm_pkg_sync == null) {
alpm_pkg_sync = get_syncpkg (pkgname);
}
if (alpm_pkg != null) {
// name
name = alpm_pkg.name;
@ -656,7 +660,11 @@ namespace Pamac {
list.next ();
}
// download size
if (alpm_pkg_sync != null) {
downloadsize = alpm_pkg_sync.download_size.to_string ();
} else {
downloadsize = alpm_pkg.download_size.to_string ();
}
// installed size
installsize = alpm_pkg.isize.to_string ();
// licenses