From: Grant Paul Date: Sun, 12 Dec 2010 07:11:07 +0000 (-0800) Subject: Fixed empty Statistics on confirm page if all statistics have been removed. X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/b5336e68d959ea438dd18073e749c18d6f1ca46d Fixed empty Statistics on confirm page if all statistics have been removed. --- diff --git a/MobileCydia.app/confirm.html b/MobileCydia.app/confirm.html index 5a4ed554..dbc6043d 100644 --- a/MobileCydia.app/confirm.html +++ b/MobileCydia.app/confirm.html @@ -15,8 +15,8 @@

:

- -
+ +
diff --git a/MobileCydia.app/confirm.js b/MobileCydia.app/confirm.js index efffdc4a..4c74b43c 100644 --- a/MobileCydia.app/confirm.js +++ b/MobileCydia.app/confirm.js @@ -1,18 +1,25 @@ $(function () { if (issues == null) { $(".issues").remove(); + var removed = 0; var downloading = sizes[0]; - if (downloading == "0.0 B") + if (downloading == "0.0 B") { $(".downloading").remove(); - else - $("#downloading").html($.xml(downloading)); + removed += 1; + } else { + $("#downloading").html($.xml(downloading)); + } var resuming = sizes[1]; - if (resuming == "0.0 B") + if (resuming == "0.0 B") { $(".resuming").remove(); - else - $("#resuming").html($.xml(resuming)); + removed += 1; + } else { + $("#resuming").html($.xml(resuming)); + } + + if (removed >= 2) $(".statistics").remove(); } else for (var i = 0; i != issues.length; ++i) { document.title = cydia.localize("CANNOT_COMPLY");