From 3a9ee176926619492a0cd757dfbd25ce3f129d59 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Sat, 11 Nov 2017 21:27:59 -0300 Subject: [PATCH] fix download size not shown during updates --- po/pamac.pot | 2 +- src/pamac-user-daemon/user_daemon.vala | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/po/pamac.pot b/po/pamac.pot index c651912..6115663 100644 --- a/po/pamac.pot +++ b/po/pamac.pot @@ -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 \n" "Language-Team: LANGUAGE \n" diff --git a/src/pamac-user-daemon/user_daemon.vala b/src/pamac-user-daemon/user_daemon.vala index 193daf5..c91b01f 100644 --- a/src/pamac-user-daemon/user_daemon.vala +++ b/src/pamac-user-daemon/user_daemon.vala @@ -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 - downloadsize = alpm_pkg.download_size.to_string (); + 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