From d8128739a503a942193870c45be8b7c8d179bb67 Mon Sep 17 00:00:00 2001 From: Martin Abente Lahaye Date: Tue, 25 Apr 2023 13:57:34 -0400 Subject: [PATCH] permissions: Allow unsetting permissions model appId This is needed due to the fact that Flatseal can switch back and forw between having applications and not having applications. --- src/models/permissions.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/models/permissions.js b/src/models/permissions.js index 09fe987d..a9bd4aee 100644 --- a/src/models/permissions.js +++ b/src/models/permissions.js @@ -254,6 +254,9 @@ var FlatpakPermissionsModel = GObject.registerClass({ } _processPendingUpdates() { + if (this._appId === '') + return; + if (this._delayedHandlerId === 0) return; @@ -278,6 +281,9 @@ var FlatpakPermissionsModel = GObject.registerClass({ } _setup() { + if (this._appId === '') + return; + Object.values(MODELS).forEach(model => model.reset()); this._loadPermissions(); this._loadGlobalOverrides();