Skip to content

Commit

Permalink
Revert notifications stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Jan 25, 2024
1 parent f00a0d4 commit ea12bb0
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions src/Backends/SystemUpdate.vala
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,10 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {

string[] package_names = {};
Pk.Info[] package_info = {};
bool security_updates = false;

foreach (var package in available_updates.get_array ()) {
package_names += package.get_name ();

var info = package.get_info ();
package_info += info ;
if (info == SECURITY) {
security_updates = true;
}
package_info += package.get_info ();
}

update_details = {
Expand All @@ -123,17 +117,10 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {

if (notify) {
var notification = new Notification (_("Update available"));
notification.set_body (_("A system update is available"));
notification.set_icon (new ThemedIcon ("software-update-available"));
notification.set_default_action (Application.ACTION_PREFIX + Application.SHOW_UPDATES_ACTION);

if (security_updates) {
notification.set_body (_("A system security update is available"));
notification.set_icon (new ThemedIcon ("software-update-urgent"));
notification.set_priority (URGENT);
} else {
notification.set_body (_("A system update is available"));
notification.set_icon (new ThemedIcon ("software-update-available"));
}

GLib.Application.get_default ().send_notification (NOTIFICATION_ID, notification);
}

Expand Down

0 comments on commit ea12bb0

Please sign in to comment.