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 9921c52
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);

Check warning on line 413 in www/js/usePermissionStatus.ts

View check run for this annotation

Codecov / codecov/patch

www/js/usePermissionStatus.ts#L411-L413

Added lines #L411 - L413 were not covered by tests
}
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 9921c52

Please sign in to comment.