Skip to content

Commit

Permalink
💩 🔧 Disable only the unused apps check
Browse files Browse the repository at this point in the history
In the previous commit, we had disabled all android background checks.
This means that the optimization check would also be disabled, and we would not
be able to start the foreground service from the background.

Let's change this to only disable to unused apps check
  • Loading branch information
shankari committed May 5, 2024
1 parent 1efda2e commit 0ec199b
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions www/js/usePermissionStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,11 @@ const usePermissionStatus = () => {
refresh: checkBatteryOpt,
};
let tempChecks = checkList;
tempChecks.push(unusedAppsUnrestrictedCheck, ignoreBatteryOptCheck);
if (appConfig.tracking?.bluetooth_only) {
tempChecks.push(ignoreBatteryOptCheck);
} else {
tempChecks.push(unusedAppsUnrestrictedCheck, ignoreBatteryOptCheck);
}
setCheckList(tempChecks);
}

Expand Down Expand Up @@ -446,10 +450,9 @@ const usePermissionStatus = () => {
setupAndroidFitnessChecks();
if (appConfig.tracking?.bluetooth_only) {
setupAndroidBluetoothChecks();
} else {
setupAndroidBackgroundRestrictionChecks();
}
setupAndroidNotificationChecks();
setupAndroidBackgroundRestrictionChecks();
} else if (window['device'].platform.toLowerCase() == 'ios') {
setupIOSLocChecks();
setupIOSFitnessChecks();
Expand Down

0 comments on commit 0ec199b

Please sign in to comment.