Skip to content

Commit

Permalink
Use correct methods to add privacy settings toggles
Browse files Browse the repository at this point in the history
  • Loading branch information
stuarthayhurst committed Aug 20, 2023
1 parent 425f713 commit 2ff02e3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions extension/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ class QuickSettingsManager {
);

//Add the toggle to the system menu
QuickSettingsMenu.addExternalIndicator(this._quickSettingToggles[i]);
let backgroundApps = QuickSettingsMenu._backgroundApps?.quickSettingsItems?.at(-1) ?? null;
QuickSettingsMenu.insertItemBefore(this._quickSettingToggles[i], backgroundApps);
});
}

Expand All @@ -277,7 +278,8 @@ class QuickGroupManager {
constructor(useQuickSubtitle) {
//Create quick settings group and add to the system menu
this._quickSettingsGroup = new PrivacyQuickGroup(useQuickSubtitle);
QuickSettingsMenu.addExternalIndicator(this._quickSettingsGroup);
let backgroundApps = QuickSettingsMenu._backgroundApps?.quickSettingsItems?.at(-1) ?? null;
QuickSettingsMenu.insertItemBefore(this._quickSettingsGroup, backgroundApps);
}

clean() {
Expand Down

0 comments on commit 2ff02e3

Please sign in to comment.