Skip to content

Commit

Permalink
Use DesktopAppInfo.search
Browse files Browse the repository at this point in the history
  • Loading branch information
leolost2605 committed Aug 26, 2023
1 parent 58c57de commit 42e849e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/App.vala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ public class Sound.App : Object {

var app_info = new DesktopAppInfo (app_id + ".desktop");

if (app_info == null) {
var results = DesktopAppInfo.search (app_id);
if (results[0] != null && results[0][0] != null) {
app_info = new DesktopAppInfo (results[0][0]);
}
}

if (app_info != null) {
display_name = app_info.get_name ();
icon = app_info.get_icon ();
Expand Down

0 comments on commit 42e849e

Please sign in to comment.