Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alainm23 committed Dec 17, 2024
1 parent dd12f63 commit 3bec9c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Widgets/DeviceRow.vala
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ public class Power.Widgets.DeviceRow : Gtk.ListBoxRow {
}

if (type_string == null) {
type_string = "%s %s".printf (battery.vendor, _("Device"));
if (battery.vendor != null && battery.vendor.strip () != "") {
type_string = "%s %s".printf (battery.vendor, _("Device"));
}

if (battery.model != null && battery.model.strip () != "") {
type_string = battery.model;
}
}

return "<b>%s</b>".printf (type_string);
Expand Down

0 comments on commit 3bec9c9

Please sign in to comment.