Skip to content

Commit

Permalink
permissions: Allow unsetting permissions model appId
Browse files Browse the repository at this point in the history
This is needed  due to the fact that Flatseal can switch
back and forw between having applications and not having
applications.
  • Loading branch information
tchx84 committed Sep 1, 2023
1 parent 684100b commit d812873
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/models/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ var FlatpakPermissionsModel = GObject.registerClass({
}

_processPendingUpdates() {
if (this._appId === '')
return;

if (this._delayedHandlerId === 0)
return;

Expand All @@ -278,6 +281,9 @@ var FlatpakPermissionsModel = GObject.registerClass({
}

_setup() {
if (this._appId === '')
return;

Object.values(MODELS).forEach(model => model.reset());
this._loadPermissions();
this._loadGlobalOverrides();
Expand Down

0 comments on commit d812873

Please sign in to comment.