Skip to content

Commit

Permalink
Dont check for automatic updates when getting update number (#2104)
Browse files Browse the repository at this point in the history
Co-authored-by: Danielle Foré <[email protected]>
  • Loading branch information
leolost2605 and danirabbit authored Feb 7, 2024
1 parent fce55d9 commit 7b0ef17
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/Core/UpdateManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ public class AppCenterCore.UpdateManager : Object {
var flatpak_updates = yield fp_client.get_updates ();
debug ("Flatpak backend reports %d updates", flatpak_updates.size);

var auto_update_enabled = AppCenter.App.settings.get_boolean ("automatic-updates");

foreach (var flatpak_update in flatpak_updates) {
var appcenter_package = fp_client.lookup_package_by_id (flatpak_update);
if (appcenter_package != null) {
Expand All @@ -125,11 +123,9 @@ public class AppCenterCore.UpdateManager : Object {
unpaid_apps_number++;
}

if (!auto_update_enabled || appcenter_package.should_pay) {
count++;
updates_size += appcenter_package.change_information.size;
has_flatpak_updates = true;
}
count++;
updates_size += appcenter_package.change_information.size;
has_flatpak_updates = true;

appcenter_package.change_information.updatable_packages.@set (fp_client, flatpak_update);
appcenter_package.update_state ();
Expand All @@ -153,10 +149,8 @@ public class AppCenterCore.UpdateManager : Object {
continue;
}

if (!AppCenter.App.settings.get_boolean ("automatic-updates")) {
runtime_count++;
has_flatpak_updates = true;
}
runtime_count++;
has_flatpak_updates = true;

runtime_desc += Markup.printf_escaped (
"%s\n\t%s\n",
Expand Down

0 comments on commit 7b0ef17

Please sign in to comment.