Skip to content

Commit

Permalink
Fix permissions dialog
Browse files Browse the repository at this point in the history
Closes #996
  • Loading branch information
sonnyp committed Jan 24, 2025
1 parent e97114e commit 156186b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ install
__pycache__
*.pyc
*.gresource
.frun

# IDEs / editors
.idea
Expand Down
5 changes: 3 additions & 2 deletions src/Permissions/Permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
isDeviceInputOverrideAvailable,
} from "../flatpak.js";

const device = isDeviceInputOverrideAvailable() ? "input" : "all";

const action_permissions = new Gio.SimpleAction({
name: "permissions",
parameter_type: null,
Expand All @@ -29,7 +31,6 @@ export function Permissions({ window }) {

picture_illustration.set_resource(illustration);

const device = isDeviceInputOverrideAvailable() ? "input" : "all";
label_command.label = `flatpak override --user --share=network --socket=pulseaudio --device=${device} ${getFlatpakId()}`;
action_row_device.title = `--input=${device}`;

Expand Down Expand Up @@ -57,7 +58,7 @@ const missing_permissions = (() => {
return (
!shared.includes("network") ||
!sockets.includes("pulseaudio") ||
!devices.includes("all")
!devices.includes(device)
);
})();

Expand Down

0 comments on commit 156186b

Please sign in to comment.