Skip to content

Commit

Permalink
fix(AppRow) support uninstalled apps
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpl committed Feb 16, 2022
1 parent 241e394 commit 6013f44
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions preferences/AppRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ var AppRow = GObject.registerClass(
class AppRow extends Gtk.ListBoxRow {
_init(app, settings) {
super._init();
this._appInfo = Gio.DesktopAppInfo.new(app.id);
this._settings = settings;
this._icon.gicon = this._appInfo.get_icon();
this._label.label = this._appInfo.get_display_name();
this.appId = app.id;

this._appInfo = Gio.DesktopAppInfo.new(app.id);
if (this._appInfo) {
this._icon.gicon = this._appInfo.get_icon();
this._label.label = this._appInfo.get_display_name();
} else {
this._label.label = app.id;
}

this._hidden.set_active(app.hidden);
this._hidden.connect("state-set", () => {
this._updateApp();
});
this.appId = this._appInfo.get_id();
}

toggleSettingsVisibility() {
Expand Down

0 comments on commit 6013f44

Please sign in to comment.