Skip to content

Commit

Permalink
Fix up mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Feb 7, 2024
1 parent 69fe359 commit 3c49731
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/Core/Client.vala
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ public class AppCenterCore.Client : Object {

private const int SECONDS_BETWEEN_REFRESHES = 60 * 60 * 24;

private AsyncMutex update_notification_mutex = new AsyncMutex ();

private Client () { }

construct {
Expand Down
10 changes: 5 additions & 5 deletions src/Core/UpdateManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,9 @@ public class AppCenterCore.UpdateManager : Object {

if (!AppCenter.App.settings.get_boolean ("automatic-updates")) {
var application = Application.get_default ();
if (was_empty && updates_number != 0U) {
string title = ngettext ("Update Available", "Updates Available", updates_number);
string body = ngettext ("%u update is available for your system", "%u updates are available for your system", updates_number).printf (updates_number);
if (count > 0) {
string title = ngettext ("Update Available", "Updates Available", count);
string body = ngettext ("%u update is available for your system", "%u updates are available for your system", count).printf (count);

var notification = new Notification (title);
notification.set_body (body);
Expand All @@ -240,8 +240,8 @@ public class AppCenterCore.UpdateManager : Object {
}

try {
yield Granite.Services.Application.set_badge (updates_number);
yield Granite.Services.Application.set_badge_visible (updates_number != 0);
yield Granite.Services.Application.set_badge (count);
yield Granite.Services.Application.set_badge_visible (count != 0);
} catch (Error e) {
warning ("Error setting updates badge: %s", e.message);
}
Expand Down

0 comments on commit 3c49731

Please sign in to comment.